diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-05-03 02:19:41 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-05-03 02:49:49 +0200 |
commit | dccee5cecb6bd7b7e369cab99eb78006879c41e9 (patch) | |
tree | 28cafd66dd93832bb853b634820db6b5b63cfbb7 /lib/call-network.nix | |
parent | 76da82197f6cb49c7cbc4fa0d534489a358b9f74 (diff) |
lib: Move callNetwork into its own file
Just to keep the default.nix clean and easy to read. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'lib/call-network.nix')
-rw-r--r-- | lib/call-network.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/call-network.nix b/lib/call-network.nix new file mode 100644 index 00000000..dac125e7 --- /dev/null +++ b/lib/call-network.nix @@ -0,0 +1,15 @@ +path: args: + +with builtins; + +let + machines = import path; +in listToAttrs (map (name: { + inherit name; + value = import ./call-machine.nix machines.${name} ({ + extraConfig = { lib, ... }: { + imports = lib.singleton (args.extraConfig or {}); + networking.hostName = lib.mkOverride 900 name; + }; + } // removeAttrs args [ "extraConfig" ]); +}) (attrNames machines)) |