From fa519d94ffca207c96eb0000ebd2c65cae57d548 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 3 Sep 2024 20:52:05 +0200 Subject: [PATCH] flake: Restructure hydraJobs output --- flake.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 1a3b0f2..c1e99a9 100644 --- a/flake.nix +++ b/flake.nix @@ -129,15 +129,18 @@ |> lib.filterAttrs (name: shell: lib.meta.availableOn platform shell)); hydraJobs = { - package = self.packages; - shell = self.devShells; + package = self.packages + |> lib.foldlAttrs (jobs: system: packages: lib.recursiveUpdate jobs + (lib.mapAttrs (name: package: { ${system} = package; }) packages)) { }; + + shell = self.devShells + |> lib.foldlAttrs (jobs: system: shells: lib.recursiveUpdate jobs + (lib.mapAttrs (name: shell: { ${system} = shell; }) shells)) { }; nixos = self.nixosConfigurations - |> lib.concatMapAttrs (name: host: { - ${host.pkgs.system} = { - ${name} = host.config.system.build.toplevel; - }; - }); + |> lib.mapAttrs (name: host: { + ${host.pkgs.system} = host.config.system.build.toplevel; + }); }; }; }