From 2effb840d8760bbe4f5dfaaf4d117ad245da8aee Mon Sep 17 00:00:00 2001 From: Jacob Bachmann Date: Wed, 17 Jan 2024 18:53:33 +0100 Subject: [PATCH] chore: cleanup code --- hosts/T430/default.nix | 6 +++--- hosts/T430/hardware.nix | 12 +++--------- hosts/W530/default.nix | 2 +- hosts/W530/hardware.nix | 6 +++--- modules/boot.nix | 5 ----- modules/sddm.nix | 12 ------------ modules/xorg.nix | 12 ------------ 7 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 modules/boot.nix delete mode 100644 modules/sddm.nix delete mode 100644 modules/xorg.nix diff --git a/hosts/T430/default.nix b/hosts/T430/default.nix index c30382f..02fe2f0 100755 --- a/hosts/T430/default.nix +++ b/hosts/T430/default.nix @@ -2,13 +2,13 @@ imports = [ ./hardware.nix ]; - networking.hostName = "T430"; # Define your hostname. + networking.hostName = "T430"; bchmnn = { gui = { enable = true; - flavour = [ "sway" "i3" ]; + flavour = [ "sway" ]; }; nvidia.enable = false; audio.enable = true; @@ -18,7 +18,7 @@ devenv.enable = true; virtualisation.enable = true; - games.enable = true; + games.enable = false; }; diff --git a/hosts/T430/hardware.nix b/hosts/T430/hardware.nix index 119ed85..56c74d9 100644 --- a/hosts/T430/hardware.nix +++ b/hosts/T430/hardware.nix @@ -7,9 +7,12 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; boot.kernelParams = [ "resume_offset=533760" ]; boot.resumeDevice = "/dev/disk/by-label/ROOT"; + boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/b7a904b2-cceb-47fc-832a-701e386a95db"; fileSystems."/" = { @@ -18,8 +21,6 @@ options = [ "subvol=@" ]; }; - boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/b7a904b2-cceb-47fc-832a-701e386a95db"; - fileSystems."/home" = { device = "/dev/disk/by-label/ROOT"; @@ -51,14 +52,7 @@ device = "/swap/swapfile"; }]; - # 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 - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/W530/default.nix b/hosts/W530/default.nix index 8bd8e10..eb3dca1 100644 --- a/hosts/W530/default.nix +++ b/hosts/W530/default.nix @@ -2,7 +2,7 @@ imports = [ ./hardware.nix ]; - networking.hostName = "W530"; # Define your hostname. + networking.hostName = "W530"; bchmnn = { diff --git a/hosts/W530/hardware.nix b/hosts/W530/hardware.nix index 67f67b6..dc90c8f 100644 --- a/hosts/W530/hardware.nix +++ b/hosts/W530/hardware.nix @@ -10,9 +10,12 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; boot.kernelParams = [ "resume_offset=9364344" ]; boot.resumeDevice = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe"; + boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/d04a2c58-4116-45d6-aa6e-2002556e6d22"; fileSystems."/" = { @@ -21,8 +24,6 @@ options = [ "subvol=@" "compress=zstd" "noatime" ]; }; - boot.initrd.luks.devices."cryptlvm".device = "/dev/disk/by-uuid/d04a2c58-4116-45d6-aa6e-2002556e6d22"; - fileSystems."/home" = { device = "/dev/disk/by-uuid/2e6bd7f5-74f0-4047-a0ab-5679b877a9fe"; @@ -83,7 +84,6 @@ }]; networking.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/boot.nix b/modules/boot.nix deleted file mode 100644 index cd4f93c..0000000 --- a/modules/boot.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: { - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; -} diff --git a/modules/sddm.nix b/modules/sddm.nix deleted file mode 100644 index 33aa3b8..0000000 --- a/modules/sddm.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, config, ... }: with config.bchmnn; lib.mkIf (gui.enable && lib.elem "i3" gui.flavour) { - - /* - services.xserver.displayManager.sddm = { - enable = true; - wayland.enable = true; - }; - - programs.sway.enable = true; - */ - -} diff --git a/modules/xorg.nix b/modules/xorg.nix deleted file mode 100644 index 73e5363..0000000 --- a/modules/xorg.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, config, ... }: with config.bchmnn; lib.mkIf (gui.enable && lib.elem "i3" gui.flavour) { - - environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw - - services.xserver = { - enable = true; - displayManager.startx.enable = true; - libinput.enable = true; - }; - -} -