From 746bca9ed1f2d492a2abddbd66f363e688baa930 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 10 Jul 2022 17:06:47 +0200 Subject: mkHost: pass arguments in a set instead of currying --- hosts/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hosts') diff --git a/hosts/default.nix b/hosts/default.nix index 571cd48..03ba710 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -8,7 +8,7 @@ let { hostname = "vm"; system = "x86_64-linux"; location = secrets.main_location; } ]; - mkHost = hostname: system: location: + mkHost = { hostname, system, location }: let pkgs = import nixpkgs { inherit system; @@ -44,4 +44,4 @@ in Map each element of the list applying the mkHost function to its elements and returning a set in the listToAttrs format builtins.listToAttrs on the result */ -builtins.listToAttrs (map ({ hostname, system, location }: { name = hostname; value = mkHost hostname system location; }) hosts) +builtins.listToAttrs (map ({ hostname, system, location }: { name = hostname; value = mkHost { inherit hostname system location; }; }) hosts) -- cgit 1.4.1