From 9bd62dba58b24625aa5e30718c1723d684e9dc22 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 21 Nov 2022 20:33:58 +0800 Subject: [PATCH] config: add `hydraJobs` to the outputs --- README.adoc | 2 ++ flake.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.adoc b/README.adoc index 6ca56aa4..cd5cba94 100644 --- a/README.adoc +++ b/README.adoc @@ -122,6 +122,8 @@ This mainly uses the link:./hosts/[hosts configuration]. * `templates` which contains my templates. Though, these are just templates mostly for my own purposes so it is not as useful as the other outputs. +* `hydraJobs` contains link:https://github.com/NixOS/hydra[Hydra] build jobs where it is primarily used for my test Hydra instance. + * `lib` is defined from link:./lib/[my custom library]. It mainly assumes it is to be included in nixpkgs standard library (i.e., `import ./lib { lib = inputs.nixpkgs.lib; }`). It's another unnecessary export but it's there. diff --git a/flake.nix b/flake.nix index 952f9119..571d0b37 100644 --- a/flake.nix +++ b/flake.nix @@ -412,5 +412,22 @@ checks = lib'.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy.lib; + + # I'm cut off from the rest of my setup with no Hydra instance yet but + # I'm sure it will grow some of them as long as you didn't put it under a + # rock. + hydraJobs = + lib'.mapAttrs' + (name: config: + lib'.nameValuePair "nixos-${name}" config.config.system.build.toplevel) + self.nixosConfigurations + // lib'.mapAttrs' + (name: config: + lib'.nameValuePair "home-manager-${name}" config.activationPackage) + self.homeManagerConfigurations + // { + build-packages = forAllSystems (system: + self.packages.${system}); + }; }; }