mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 02:14:13 -05:00
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)
24 lines
724 B
Nix
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;
|
|
}
|