summary refs log tree commit diff stats
path: root/flake/nixosConfigurations/default.nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-12-14 20:24:32 +0100
committersils <sils@sils.li>2023-12-14 20:24:32 +0100
commit2615ad7fd9f9156e5da4ca47df975cea5a974cae (patch)
tree907760e4b35ab20b9c130198b4ee50defd9a225a /flake/nixosConfigurations/default.nix
parentbuild(flake): update (diff)
downloadnix-config-2615ad7fd9f9156e5da4ca47df975cea5a974cae.tar.gz
nix-config-2615ad7fd9f9156e5da4ca47df975cea5a974cae.zip
feat(flake/nixosConfigurations): introduce convenience function
Diffstat (limited to '')
-rw-r--r--flake/nixosConfigurations/default.nix39
1 files changed, 32 insertions, 7 deletions
diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix
index ca48c21..60f33b1 100644
--- a/flake/nixosConfigurations/default.nix
+++ b/flake/nixosConfigurations/default.nix
@@ -27,15 +27,40 @@
       };
     }
   ];
+  nixosConfig = {
+    hostname,
+    mainDisk,
+    rootPart,
+    bootPart,
+    system ? "x86_64-linux",
+  } @ conf:
+    nixpkgs.lib.nixosSystem {
+      inherit system;
+      specialArgs = attrs // conf;
+      modules =
+        [
+          (import ../../sys)
+          (import ../../secrets)
+          (import ./basesystem.nix)
+        ]
+        ++ defaultModules;
+    };
 in {
-  thinklappi = nixpkgs.lib.nixosSystem {
+  #thinklappi = nixpkgs.lib.nixosSystem {
+  #  system = "x86_64-linux";
+  #  specialArgs = attrs;
+  #  modules =
+  #    [
+  #      ../../hosts/thinklappi
+  #    ]
+  #    ++ defaultModules;
+  #};
+  thinklappi = nixosConfig {
+    hostname = "thinklappi";
+    rootPart = "/dev/disk/by-uuid/6700d662-29a9-4ea5-8ca6-85d42550b3ab";
+    mainDisk = "/dev/disk/by-uuid/68da1329-f5ea-4f2c-a38e-faffaaaa6b5a";
+    bootPart = "/dev/disk/by-uuid/4064-2D6C";
     system = "x86_64-linux";
-    specialArgs = attrs;
-    modules =
-      [
-        ../../hosts/thinklappi
-      ]
-      ++ defaultModules;
   };
   thinklappi-bootstrap = nixpkgs.lib.nixosSystem {
     system = "x86_64-linux";