diff options
| author | seth <[email protected]> | 2024-02-04 16:40:38 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-04 16:41:47 -0500 |
| commit | 5f848623dff7cbcd21911032e5fd4c77bcf7d413 (patch) | |
| tree | 7462ae7abec5beee71443702b330e3eeca1a407f /repo/ci.nix | |
| parent | 371235663a4e8d783dfc4294bb0b10cd3206c9c6 (diff) | |
tree-wide: better separate/name some things
Diffstat (limited to 'repo/ci.nix')
| -rw-r--r-- | repo/ci.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/repo/ci.nix b/repo/ci.nix new file mode 100644 index 0000000..e33c088 --- /dev/null +++ b/repo/ci.nix @@ -0,0 +1,28 @@ +{ + lib, + self, + ... +}: { + flake.hydraJobs = let + ciSystems = ["x86_64-linux"]; + + getOutputs = lib.getAttrs ciSystems; + + mapCfgsToDerivs = lib.mapAttrs (_: cfg: cfg.activationPackage or cfg.config.system.build.toplevel); + getCompatibleCfgs = lib.filterAttrs (_: cfg: lib.elem cfg.pkgs.system ciSystems); + in + builtins.foldl' lib.recursiveUpdate {} [ + ( + lib.genAttrs + ["nixosConfigurations" "homeConfigurations"] + ( + type: mapCfgsToDerivs (getCompatibleCfgs self."${type}") + ) + ) + ( + lib.genAttrs + ["checks" "devShells"] + (type: getOutputs self.${type}) + ) + ]; +} |
