Files
Foundry/hydra.nix
T
Gabriel Fontes 8835d4f029 feat(hydra): build themes packages
Add themes to hydraJobs by reusing the themes flake's own hydraJobs output
(inputs.themes.hydraJobs), so the sub-flake declares what it wants built.
Surfaces allColorschemes and allWallpapers per system.

Assisted-by: pi (opus-4.8)
2026-07-04 16:54:01 -03:00

23 lines
727 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;
themes = inputs.themes.hydraJobs;
hosts = lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) outputs.nixosConfigurations;
homes = lib.mapAttrs (_: cfg: cfg.activationPackage) outputs.homeConfigurations;
}