From dccee5cecb6bd7b7e369cab99eb78006879c41e9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 3 May 2016 02:19:41 +0200 Subject: lib: Move callNetwork into its own file Just to keep the default.nix clean and easy to read. Signed-off-by: aszlig --- lib/call-network.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/call-network.nix (limited to 'lib/call-network.nix') 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)) -- cgit 1.4.1