summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-08-02 12:34:12 +0200
committersils <sils@sils.li>2023-08-02 12:34:12 +0200
commitfd5aae84b9c9a4911acb5a4ab290997b2da73ba7 (patch)
treefb13a70eb0aa5d68bfd67750f842539837034505 /flake.nix
parentFix(hosts/thinklappi): Mark /srv as needed for boot (diff)
downloadnix-config-fd5aae84b9c9a4911acb5a4ab290997b2da73ba7.tar.gz
nix-config-fd5aae84b9c9a4911acb5a4ab290997b2da73ba7.zip
Refactor(flake): Declare defaultModules
This eases adding of further hosts
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix33
1 files changed, 18 insertions, 15 deletions
diff --git a/flake.nix b/flake.nix
index 71459ec..5e99b1e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -121,26 +121,29 @@
       inherit system;
       overlays = [nixneovim.overlays.default];
     };
-
     sysLib = shell_library.lib.${system};
+    defaultModules = [
+      impermanence.nixosModules.impermanence
+      lanzaboote.nixosModules.lanzaboote
+      home-manager.nixosModules.home-manager
+      {
+        home-manager = {
+          useGlobalPkgs = true;
+          useUserPackages = true;
+          users.sils = import ./users/sils;
+          extraSpecialArgs = {inherit pkgs system sysLib river_init_lesser yambar_cpu yambar_memory prismlauncher nixneovim impermanence;};
+        };
+      }
+    ];
   in {
     nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem {
       inherit system;
       specialArgs = attrs;
-      modules = [
-        impermanence.nixosModules.impermanence
-        lanzaboote.nixosModules.lanzaboote
-        ./hosts/thinklappi
-        home-manager.nixosModules.home-manager
-        {
-          home-manager = {
-            useGlobalPkgs = true;
-            useUserPackages = true;
-            users.sils = import ./users/sils;
-            extraSpecialArgs = {inherit pkgs system sysLib river_init_lesser yambar_cpu yambar_memory prismlauncher nixneovim impermanence;};
-          };
-        }
-      ];
+      modules =
+        [
+          ./hosts/thinklappi
+        ]
+        ++ defaultModules;
     };
     devShells."${system}" = {
       default = pkgs.mkShell {