mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
add aggregate jobs for colorschemes and wallpapers
This commit is contained in:
@@ -2,15 +2,26 @@
|
||||
inputs,
|
||||
outputs,
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) filterAttrs mapAttrs elem;
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
|
||||
notBroken = pkg: !(pkg.meta.broken or false);
|
||||
isDistributable = pkg: (pkg.meta.license or {redistributable = true;}).redistributable;
|
||||
hasPlatform = sys: pkg: elem sys (pkg.meta.platforms or []);
|
||||
filterValidPkgs = sys: pkgs: filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg && isDistributable pkg) pkgs;
|
||||
hasPlatform = sys: pkg: lib.elem sys (pkg.meta.platforms or []);
|
||||
filterValidPkgs = sys: pkgs: lib.filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg && isDistributable pkg) pkgs;
|
||||
|
||||
getConfigTopLevel = (_: cfg: cfg.config.system.build.toplevel);
|
||||
mkAggregate = name: (
|
||||
system: packages: let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
pkgs.releaseTools.aggregate {
|
||||
inherit name;
|
||||
constituents = builtins.attrValues packages.${name};
|
||||
}
|
||||
);
|
||||
in {
|
||||
pkgs = mapAttrs filterValidPkgs outputs.packages;
|
||||
wallpapers = mapAttrs (_: v: v.wallpapers) outputs.packages;
|
||||
colorschemes = mapAttrs (_: v: v.colorschemes) outputs.packages;
|
||||
hosts = mapAttrs (_: cfg: cfg.config.system.build.toplevel) outputs.nixosConfigurations;
|
||||
pkgs = lib.mapAttrs filterValidPkgs outputs.packages;
|
||||
wallpapers = lib.mapAttrs (mkAggregate "wallpapers") outputs.packages;
|
||||
colorschemes = lib.mapAttrs (mkAggregate "wallpapers") outputs.packages;
|
||||
hosts = lib.mapAttrs getConfigTopLevel outputs.nixosConfigurations;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user