diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-05-03 02:08:17 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-05-03 02:49:49 +0200 |
commit | a3b9a4f08ec836336fbd0070c6523dd5c6f4827b (patch) | |
tree | b8122e0c5b4868d0df6ffb136603fdce4caee481 /lib | |
parent | 603803164610371275b0054262e6de584b78eabe (diff) |
Move callMachines into lib/
We now no longer need to import the call-machine.nix directly but now can use import <vuizvui/lib> in order to get *both* the callMachine and the callMachines function. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
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)); +} |