summary refs log tree commit diff stats
path: root/hosts/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 17:59:52 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 17:59:52 +0100
commit8245579c8af73c8f40f5978878c7944c814ba04f (patch)
tree006caa951e345f481be3b91b85bcfda1061956d9 /hosts/default.nix
parentrefactor(modules/impermanence): Migrate to by-name while distributing mods (diff)
downloadnixos-server-8245579c8af73c8f40f5978878c7944c814ba04f.tar.gz
nixos-server-8245579c8af73c8f40f5978878c7944c814ba04f.zip
[WIP]
Diffstat (limited to 'hosts/default.nix')
-rw-r--r--hosts/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/hosts/default.nix b/hosts/default.nix
new file mode 100644
index 0000000..f7df5d3
--- /dev/null
+++ b/hosts/default.nix
@@ -0,0 +1,25 @@
+{
+  pkgs,
+  nixLib,
+  nixpkgs,
+  specialArgs,
+  extraModules,
+}: let
+  hosts = nixLib.mkByName {
+    useShards = false;
+    baseDirectory = ./by-name;
+    fileName = "configuration.nix";
+    finalizeFunction = name: value:
+      nixpkgs.lib.nixosSystem {
+        system = "x86_64-linux";
+        inherit specialArgs;
+        modules =
+          extraModules
+          ++ [
+            ../modules
+            value
+          ];
+      };
+  };
+in
+  hosts