Skip to content

Commit

Permalink
Add version.json to hydra job aggregate
Browse files Browse the repository at this point in the history
ala iohk-nix. would hopefully get pending status to work.
  • Loading branch information
Shay Bergmann committed Jul 26, 2021
1 parent 880c061 commit d19c24c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mk-hashi-stack.nix
Expand Up @@ -142,13 +142,16 @@ in lib.makeScope pkgs.newScope (self:
nixosConfigurations = pkgs.mkNixosConfigurations self.clusters;

hydraJobs.x86_64-linux = let
build-version = pkgs.writeText "version.json" (builtins.toJSON {
inherit (flake) lastModified lastModifiedDate narHash outPath shortRev rev;
});
nixosConfigurations =
lib.mapAttrs (_: { config, ... }: config.system.build.toplevel)
self.nixosConfigurations;
in nixosConfigurations // {
nixosConfigurations = pkgs.releaseTools.aggregate {
required = pkgs.releaseTools.aggregate {
name = "nixosConfigurations";
constituents = builtins.attrValues nixosConfigurations;
constituents = (builtins.attrValues nixosConfigurations) ++ [ build-version ];
meta.description = "All NixOS Configurations";
};
};
Expand Down

0 comments on commit d19c24c

Please sign in to comment.