Lets try hyrda again.
This commit is contained in:
parent
9dfc28be1c
commit
344351cf3b
2 changed files with 19 additions and 0 deletions
|
@ -75,6 +75,7 @@
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"durincore" = nixpkgs-unstable.lib.nixosSystem {
|
"durincore" = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
18
hydra.nix
Normal file
18
hydra.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ 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;
|
||||||
|
getCfg = _: cfg: cfg.config.system.build.toplevel;
|
||||||
|
getHomeCfg = _: cfg: cfg.config.home.activationPackage;
|
||||||
|
in {
|
||||||
|
# pkgs = mapAttrs filterValidPkgs outputs.packages;
|
||||||
|
hosts = mapAttrs getCfg outputs.nixosConfigurations;
|
||||||
|
# homes = mapAttrs getHomeCfg outputs.homeConfigurations;
|
||||||
|
}
|
Reference in a new issue