From a3b9a4f08ec836336fbd0070c6523dd5c6f4827b Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 3 May 2016 02:08:17 +0200 Subject: Move callMachines into lib/ We now no longer need to import the call-machine.nix directly but now can use import in order to get *both* the callMachine and the callMachines function. Signed-off-by: aszlig --- machines/default.nix | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'machines/default.nix') diff --git a/machines/default.nix b/machines/default.nix index 13cf8f6e..b616bd9a 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -1,20 +1,6 @@ -{ system ? builtins.currentSystem, ... }: +with import ../lib; -let - callMachine = import ../lib/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)); - nixpkgs = import (import ../nixpkgs-path.nix) {}; -in { +{ aszlig = { dnyarri = callMachine ./aszlig/dnyarri.nix {}; mmrnmhrm = callMachine ./aszlig/mmrnmhrm.nix {}; -- cgit 1.4.1