From 07192181daf9cbcef255d0c8ff0657bf477e6597 Mon Sep 17 00:00:00 2001 From: andrey_varnavskiy Date: Fri, 29 Nov 2024 20:42:28 +0500 Subject: [PATCH] this is genious --- flake.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 9d99252..846acad 100644 --- a/flake.nix +++ b/flake.nix @@ -38,11 +38,10 @@ }; in { - nixosConfigurations = { - ${builtins.elemAt hosts 0} = makeSystem { - hostname = builtins.elemAt hosts 0; - }; - }; + nixosConfigurations = nixpkgs.lib.foldl' (configs: hostname: + configs // { + "${hostname}" = makeSystem { inherit hostname; }; + }) {} hosts; homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system};