mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
format with alejandra
okay i'm not a big fan of nixfmt in the end
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
{ inputs, outputs }:
|
||||
let
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) filterAttrs mapAttrs elem;
|
||||
|
||||
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;
|
||||
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;
|
||||
getCfg = _: cfg: cfg.config.system.build.toplevel;
|
||||
in
|
||||
{
|
||||
in {
|
||||
pkgs = mapAttrs filterValidPkgs outputs.packages;
|
||||
hosts = mapAttrs getCfg outputs.nixosConfigurations;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user