Files
Gabriel Fontes 5bd536014a feat(hydra): build systemConfigs as hosts jobs
Fold outputs.systemConfigs into the hydra 'hosts' jobs alongside
nixosConfigurations, so Hydra builds mgc's system-manager generation as
hosts.mgc (matching the hosts.<name> convention the auto-upgrade uses).

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:03:04 -03:00

24 lines
724 B
Nix

{
inputs,
outputs,
}: let
inherit (inputs.nixpkgs) lib;
notBroken = pkg: !(pkg.meta.broken or false);
isDistributable = pkg: (pkg.meta.license or {redistributable = true;}).redistributable;
hasPlatform = sys: pkg: lib.elem sys (pkg.meta.platforms or [sys]);
filterValidPkgs = sys: pkgs:
lib.filterAttrs (_: pkg:
lib.isDerivation pkg
&& hasPlatform sys pkg
&& notBroken pkg
&& isDistributable pkg)
pkgs;
in {
pkgs = lib.mapAttrs filterValidPkgs outputs.packages;
hosts =
lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) outputs.nixosConfigurations
// outputs.systemConfigs;
homes = lib.mapAttrs (_: cfg: cfg.activationPackage) outputs.homeConfigurations;
}