diff --git a/base.nix b/base.nix index ab1d623..e24ca24 100644 --- a/base.nix +++ b/base.nix @@ -117,7 +117,12 @@ }; time.timeZone = "Europe/Helsinki"; - boot.loader.timeout = 0; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + timeout = 0; + }; + services.logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; #################### Memory management #################### zramSwap.enable = true; diff --git a/hardware-specific/amd-laptop.nix b/hardware-specific/amd-laptop.nix index b25bc9d..76f0c62 100644 --- a/hardware-specific/amd-laptop.nix +++ b/hardware-specific/amd-laptop.nix @@ -18,7 +18,5 @@ Option "TearFree" "true" ''; }; - - logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; }; } diff --git a/machine-confs/generic.nix b/machine-confs/generic.nix index 0ecb2dc..a15923f 100644 --- a/machine-confs/generic.nix +++ b/machine-confs/generic.nix @@ -4,9 +4,6 @@ imports = [ ../base.nix ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - #Many installs will need this, and it won't hurt either way services.qemuGuest.enable = true; diff --git a/machine-confs/helium.nix b/machine-confs/helium.nix index 9dd28de..52e4d20 100644 --- a/machine-confs/helium.nix +++ b/machine-confs/helium.nix @@ -89,10 +89,5 @@ }; resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b"; kernelParams = [ "resume_offset=44537856" ]; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; }; } diff --git a/machine-confs/lithium.nix b/machine-confs/lithium.nix index 5cfd63a..c74edf6 100644 --- a/machine-confs/lithium.nix +++ b/machine-confs/lithium.nix @@ -61,12 +61,5 @@ resumeDevice = "/dev/mapper/nixos"; kernelParams = [ "resume_offset=39292928" ]; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; }; - - services.logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend"; } diff --git a/machine-confs/nextcloud.nix b/machine-confs/nextcloud.nix index ac90358..559b559 100644 --- a/machine-confs/nextcloud.nix +++ b/machine-confs/nextcloud.nix @@ -8,10 +8,5 @@ ]; # HARDWARE SPECIFIC - services.qemuGuest.enable = true; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; } diff --git a/machine-confs/nixos-cpu.nix b/machine-confs/nixos-cpu.nix index 273a814..a9cdc83 100644 --- a/machine-confs/nixos-cpu.nix +++ b/machine-confs/nixos-cpu.nix @@ -9,9 +9,5 @@ ]; # HARDWARE SPECIFIC - services.qemuGuest.enable = true; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; } diff --git a/machine-confs/vaultwarden.nix b/machine-confs/vaultwarden.nix index ebbe10d..2095634 100644 --- a/machine-confs/vaultwarden.nix +++ b/machine-confs/vaultwarden.nix @@ -8,10 +8,5 @@ ]; # HARDWARE SPECIFIC - services.qemuGuest.enable = true; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; } diff --git a/machine-confs/wg-rpi.nix b/machine-confs/wg-rpi.nix index 214bb1b..c1e20db 100644 --- a/machine-confs/wg-rpi.nix +++ b/machine-confs/wg-rpi.nix @@ -108,6 +108,8 @@ in "usb_storage" ]; loader = { + systemd-boot.enable = pkgs.lib.mkForce false; + efi.canTouchEfiVariables = pkgs.lib.mkForce false; grub.enable = false; generic-extlinux-compatible.enable = true; };