diff --git a/flake.lock b/flake.lock index bddcdd6..7609277 100644 --- a/flake.lock +++ b/flake.lock @@ -60,26 +60,6 @@ "type": "github" } }, - "disko": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1706302763, - "narHash": "sha256-Le1wk75qlzOSfzDk8vqYxSdoEyr/ORIbMhziltVNGYw=", - "owner": "nix-community", - "repo": "disko", - "rev": "f7424625dc1f2e4eceac3009cbd1203d566feebc", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "disko", - "type": "github" - } - }, "emacs": { "inputs": { "flake-utils": "flake-utils", @@ -444,7 +424,6 @@ "root": { "inputs": { "agenix": "agenix", - "disko": "disko", "emacs": "emacs", "home-manager": "home-manager_2", "home-manager-unstable": "home-manager-unstable", diff --git a/flake.nix b/flake.nix index aea3c4a..da3e36c 100644 --- a/flake.nix +++ b/flake.nix @@ -40,9 +40,6 @@ url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - disko.url = "github:nix-community/disko"; - disko.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { home-manager, nixpkgs, nixpkgs-unstable, ... }@inputs: { diff --git a/hosts/dregil/configuration.nix b/hosts/dregil/configuration.nix index 51fe3f9..a2a7861 100644 --- a/hosts/dregil/configuration.nix +++ b/hosts/dregil/configuration.nix @@ -16,8 +16,6 @@ in { # Include the results of the hardware scan. ./hardware-configuration.nix # - ../../modules/wm/x.nix - ../../modules/wm/xmonad.nix ]; # Use the systemd-boot EFI boot loader. @@ -38,6 +36,10 @@ in { 127.0.0.1 localhost dregil.localdomain dregil ''; + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + i18n = { extraLocaleSettings = { TIME_STYLE = "iso"; }; supportedLocales = @@ -46,9 +48,40 @@ in { console = { font = "Lat2-Terminus16"; + #useXkbConfig = true; # use xkbOptions in tty. keyMap = "dvorak"; }; + # Enable the X11 windowing system. + services.xserver = { + enable = true; + exportConfiguration = true; + + # Configure keymap in X11 + layout = "us"; + + xkbOptions = "terminate:ctrl_alt_bksp,caps:escape,compose:ralt"; + + videoDrivers = [ "nvidia" ]; # "modesetting" ]; + + displayManager.lightdm = { + enable = true; + greeters.slick.enable = true; + }; + + desktopManager.xfce.enable = true; + desktopManager.gnome.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + libinput = { + enable = true; + touchpad.disableWhileTyping = true; + touchpad.naturalScrolling = true; + mouse.naturalScrolling = + config.services.xserver.libinput.touchpad.naturalScrolling; + }; + }; + fonts = { enableDefaultPackages = true; packages = with pkgs; [ @@ -114,8 +147,6 @@ in { # Enable the OpenSSH daemon. services.openssh.enable = true; - services.blueman.enable = true; - # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; diff --git a/hosts/dregil/hardware-configuration.nix b/hosts/dregil/hardware-configuration.nix index 8aba9e8..c21e13f 100644 --- a/hosts/dregil/hardware-configuration.nix +++ b/hosts/dregil/hardware-configuration.nix @@ -4,19 +4,12 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ - "dm-snapshot" - "uas" - "usbcore" - "usb_storage" - "vfat" - "nls_cp437" - "nls_iso8859_1" - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" "uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1" ]; boot.initrd.luks.devices = { root = { device = "/dev/disk/by-uuid/bebf96d1-2a2b-412c-a5f0-f9ed5730a05f"; @@ -31,31 +24,33 @@ boot.extraModulePackages = [ pkgs.linuxPackages.nvidia_x11 ]; boot.kernelParams = [ "module_blacklist=i915" ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" ]; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" ]; + }; - fileSystems."/home" = { - device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; - fsType = "btrfs"; - options = [ "subvol=home" "compress=zstd" ]; - }; + fileSystems."/home" = + { device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" ]; + }; - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; - }; + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/a88ac058-e704-419e-ba7d-1d0ff4b6f654"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/786D-42D7"; - fsType = "vfat"; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/786D-42D7"; + fsType = "vfat"; + }; swapDevices = - [{ device = "/dev/disk/by-uuid/b8c224ad-095e-4a48-b5b2-a19451fdeb95"; }]; + [ { device = "/dev/disk/by-uuid/b8c224ad-095e-4a48-b5b2-a19451fdeb95"; + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -67,23 +62,22 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.nvidia = { - nvidiaSettings = true; - nvidiaPersistenced = true; + nvidiaSettings = true; + nvidiaPersistenced = true; - # modesetting.enable = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; - # prime = { - # offload.enable = true; - # - # intelBusId = "PCI:1:0:0"; - # nvidiaBusId = "PCI:1:0:0"; - # intelBusId = "0@0:2:0"; - # nvidiaBusId = "1@1:0:0"; - # }; +# modesetting.enable = true; + package = config.boot.kernelPackages.nvidiaPackages.beta; +# prime = { +# offload.enable = true; +# +# intelBusId = "PCI:1:0:0"; +# nvidiaBusId = "PCI:1:0:0"; +# intelBusId = "0@0:2:0"; +# nvidiaBusId = "1@1:0:0"; +# }; }; hardware.opengl = { @@ -93,5 +87,4 @@ }; hardware.keyboard.uhk.enable = true; - hardware.bluetooth.enable = true; } diff --git a/hosts/igor/default.nix b/hosts/igor/default.nix index 02d17e9..679c10d 100644 --- a/hosts/igor/default.nix +++ b/hosts/igor/default.nix @@ -1,15 +1,13 @@ -{ config, inputs, lib, pkgs, ... }: +{ config, lib, pkgs, ... }: { imports = [ - inputs.disko.nixosModules.disko ../../modules/security.nix ../../modules/nix-config.nix ../../modules/iohk.nix ../../modules/timezone.nix ../../modules/keybase.nix ../../modules/ssh.nix - ./disko-config.nix ]; networking = let extIface = "ens3"; diff --git a/hosts/igor/disko-config.nix b/hosts/igor/disko-config.nix deleted file mode 100644 index cd3c4aa..0000000 --- a/hosts/igor/disko-config.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - disko.devices = { - disk.main = { - type = "disk"; - device = "/dev/mmcblk0"; - content = { - type = "gpt"; - partitions = { - ESP = { - priority = 1; - name = "ESP"; - start = "1M"; - end = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - - root = { - size = "100%"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - - subvolumes = { - "/rootfs" = { mountpoint = "/"; }; - "/home" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/home"; - }; - "/nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; - mountpoint = "/nix"; - }; - "/swap" = { - mountpoint = "/.swapvol"; - swap = { swapfile.size = "2G"; }; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/modules/wm/gnome.nix b/modules/wm/gnome.nix deleted file mode 100644 index 865d469..0000000 --- a/modules/wm/gnome.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - -} diff --git a/modules/wm/x.nix b/modules/wm/x.nix deleted file mode 100644 index 58e31d9..0000000 --- a/modules/wm/x.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - # Enable the X11 windowing system. - services = { - dbus = { enable = true; }; - - xserver = { - enable = true; - exportConfiguration = true; - - # Configure keymap in X11 - layout = "us"; - - xkbOptions = "terminate:ctrl_alt_bksp,caps:escape,compose:ralt"; - - videoDrivers = [ "nvidia" ]; # "modesetting" ]; - - displayManager.lightdm = { - enable = true; - greeters.slick.enable = true; - }; - - desktopManager.xfce.enable = true; - desktopManager.gnome.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - libinput = { - enable = true; - touchpad.disableWhileTyping = true; - mouse.naturalScrolling = - config.services.xserver.libinput.touchpad.naturalScrolling; - }; - }; - }; -} diff --git a/modules/wm/xmonad.nix b/modules/wm/xmonad.nix deleted file mode 100644 index 392b324..0000000 --- a/modules/wm/xmonad.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services = { - gnome.gnome-keyring.enable = true; - upower.enable = true; - - xserver = { - windowManager.xmonad = { - enable = true; - enableContribAndExtras = true; - }; - }; - }; - - systemd.services.upower.enable = true; -}