diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 00000000..30661328 --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,15 @@ +rec { + callMachine = import ./call-machine.nix; + + callMachines = path: args: let + machines = import path; + in with builtins; listToAttrs (map (name: { + inherit name; + value = callMachine machines.${name} ({ + extraConfig = { lib, ... }: { + imports = lib.singleton (args.extraConfig or {}); + networking.hostName = lib.mkOverride 900 name; + }; + } // removeAttrs args [ "extraConfig" ]); + }) (attrNames machines)); +} |