From c3b513ea0afcbc77b14b3dead0ac673886276f98 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Wed, 29 Jan 2025 13:47:26 -0500 Subject: [PATCH] move boot.loader into hardware config for all hosts --- .../hardware-configuration.nix | 6 +++ .../hardware-configuration.nix | 6 +++ hosts/Parzival/hardware-configuration.nix | 6 +++ hosts/WCE-Overseer/hardware-configuration.nix | 6 +++ modules/hardware/boot.nix | 12 ------ modules/hardware/default.nix | 1 - modules/options.nix | 2 +- modules/users/lighthouse/setup.nix | 39 +++++++++---------- 8 files changed, 43 insertions(+), 35 deletions(-) delete mode 100644 modules/hardware/boot.nix diff --git a/hosts/Parzival-Framework/hardware-configuration.nix b/hosts/Parzival-Framework/hardware-configuration.nix index 465bfc3..b9200c3 100644 --- a/hosts/Parzival-Framework/hardware-configuration.nix +++ b/hosts/Parzival-Framework/hardware-configuration.nix @@ -16,6 +16,12 @@ boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; diff --git a/hosts/Parzival-Mobile/hardware-configuration.nix b/hosts/Parzival-Mobile/hardware-configuration.nix index 49c6e71..5afb09b 100644 --- a/hosts/Parzival-Mobile/hardware-configuration.nix +++ b/hosts/Parzival-Mobile/hardware-configuration.nix @@ -16,6 +16,12 @@ boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; diff --git a/hosts/Parzival/hardware-configuration.nix b/hosts/Parzival/hardware-configuration.nix index 79fd22f..f157bd1 100644 --- a/hosts/Parzival/hardware-configuration.nix +++ b/hosts/Parzival/hardware-configuration.nix @@ -16,6 +16,12 @@ boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-amd"]; boot.extraModulePackages = []; + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; diff --git a/hosts/WCE-Overseer/hardware-configuration.nix b/hosts/WCE-Overseer/hardware-configuration.nix index ae7c0ae..dda90e4 100644 --- a/hosts/WCE-Overseer/hardware-configuration.nix +++ b/hosts/WCE-Overseer/hardware-configuration.nix @@ -17,6 +17,12 @@ boot.initrd.kernelModules = []; boot.kernelModules = []; boot.extraModulePackages = []; + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + }; + }; fileSystems."/" = { device = "zroot"; diff --git a/modules/hardware/boot.nix b/modules/hardware/boot.nix deleted file mode 100644 index 298f60e..0000000 --- a/modules/hardware/boot.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config = { - boot = { - loader = { - systemd-boot.enable = true; - efi = { - canTouchEfiVariables = true; - }; - }; - }; - }; -} diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 1190536..5469879 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -6,7 +6,6 @@ imports = [ ./network.nix ./audio.nix - ./boot.nix ./graphics.nix ]; } diff --git a/modules/options.nix b/modules/options.nix index e3af93d..7a61765 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -97,7 +97,7 @@ }; lighthouse = { enable = lib.mkDefault false; - }; + }; }; # Desktop options are declared in their relevant modules in module/desktops diff --git a/modules/users/lighthouse/setup.nix b/modules/users/lighthouse/setup.nix index 4df9967..d8a2323 100644 --- a/modules/users/lighthouse/setup.nix +++ b/modules/users/lighthouse/setup.nix @@ -6,28 +6,25 @@ ... }: lib.mkIf config.user.lighthouse.enable { + sops = { + age.keyFile = "/var/lib/sops-nix/key.txt"; + age.generateKey = true; + }; - - sops = { - age.keyFile = "/var/lib/sops-nix/key.txt"; - age.generateKey = true; + sops.secrets.cert = {}; + sops.secrets.key = {}; + + services.nebula.networks.test = { + enable = true; + isLighthouse = true; + ca = inputs.nix-secrets.nebula.ca; + cert = config.sops.secrets.cert.path; + key = config.sops.secrets.key.path; + settings = { + listen = { + host = "0.0.0.0"; + port = 4242; }; - - sops.secrets.cert = {}; - sops.secrets.key = {}; - - services.nebula.networks.test = { - enable = true; - isLighthouse = true; - ca = inputs.nix-secrets.nebula.ca; - cert = config.sops.secrets.cert.path; - key = config.sops.secrets.key.path; - settings = { - listen = { - host = "0.0.0.0"; - port = 4242; - }; - }; }; - + }; }