mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-14 16:36:24 +00:00
f3fd89af54
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
13 lines
459 B
Nix
13 lines
459 B
Nix
{ inputs, outputs }:
|
|
let
|
|
inherit (inputs.nixpkgs.lib) filterAttrs mapAttrs elem;
|
|
|
|
notBroken = pkg: !(pkg.meta.broken or false);
|
|
hasPlatform = sys: pkg: elem sys (pkg.meta.platforms or [ ]);
|
|
filterValidPkgs = sys: pkgs: filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg) pkgs;
|
|
getCfg = _: cfg: cfg.config.system.build.toplevel;
|
|
in
|
|
{
|
|
pkgs = mapAttrs filterValidPkgs outputs.packages;
|
|
hosts = mapAttrs getCfg outputs.nixosConfigurations;
|
|
}
|