rework flake, move hydra stuff

This commit is contained in:
Gabriel Fontes
2023-02-01 18:01:58 -03:00
parent c088968c43
commit 08f141e979
3 changed files with 39 additions and 43 deletions
+12
View File
@@ -0,0 +1,12 @@
{ 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;
filterValidPkgs = sys: pkgs: filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg);
getCfg = _: cfg: cfg.config.system.build.build.toplevel;
in {
packages = mapAttrs filterValidPkgs outputs.packages;
nixos = mapAttrs getCfg outputs.nixosConfigurations;
}