Files
nix-dotfiles/hydra/jobs.nix
ahuston-0 f4ff5a6251
All checks were successful
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 9m40s
Check Nix flake / Perform Nix flake checks (pull_request) Successful in 14m52s
remove lix, add homes to hydra
2025-07-08 01:10:59 -04:00

54 lines
1.3 KiB
Nix

{
inputs,
outputs,
systems,
}:
let
inherit (inputs.nixpkgs) lib;
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
getCfg = _: cfg: cfg.config.system.build.toplevel;
hostToAgg = _: cfg: cfg;
getHome = _: cfg: cfg.config.home.activationPackage;
homeToAgg = _: cfg: cfg;
# get per-system check derivation (with optional postfix)
mapSystems =
{
check,
postfix ? "",
}:
(map (system: if postfix == "" then check.${system} else check.${system}.${postfix}) systems);
in
rec {
inherit (outputs) formatter devShells checks;
host = lib.mapAttrs getCfg outputs.nixosConfigurations;
home = lib.mapAttrs getHome outputs.homeConfigurations; # homeConfigurations.alice.config.home.activationPackage
hosts = pkgs.releaseTools.aggregate {
name = "hosts";
constituents = lib.mapAttrsToList hostToAgg host;
};
homes = pkgs.releaseTools.aggregate {
name = "homes";
constituents = lib.mapAttrsToList homeToAgg home;
};
devChecks = pkgs.releaseTools.aggregate {
name = "devChecks";
constituents = lib.flatten [
(mapSystems { check = formatter; })
(mapSystems {
check = checks;
postfix = "pre-commit-check";
})
(mapSystems {
check = devShells;
postfix = "default";
})
];
};
}