format with alejandra

okay i'm not a big fan of nixfmt in the end
This commit is contained in:
Gabriel Fontes
2024-04-07 14:21:47 -03:00
parent 0048d1d8da
commit 7885b414a4
202 changed files with 2493 additions and 2486 deletions
+8 -8
View File
@@ -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;
}