Summary Files Commits Branches @commit @diff @stats
path: root / autoconfig.nix
diff options
context:
space:
mode:
1 files changed, 20 insertions, 0 deletions
-rw-r--r--autoconfig.nix20
diff --git a/autoconfig.nix b/autoconfig.nix
new file mode 100644
index 0000000..5460362
--- /dev/null
+++ b/autoconfig.nix
@@ -0,0 +1,20 @@
+{ inputs, ... }:
+let
+ inherit (inputs) nixpkgs;
+ inherit (nixpkgs) lib;
+in {
+ configurations =
+ lib.mapAttrs
+ (dir: _:
+ let
+ inherit (import ./machines/${dir}/sysidentity.nix) sysidentity;
+ in lib.nixosSystem {
+ system = sysidentity.arch;
+ modules = [
+ ./machines/${dir}/hardware-configuration.nix
+ ./configuration.nix
+ ];
+ }
+ )
+ (lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./machines));
+}