hydra updates!

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-04-17 20:51:36 -04:00 committed by Alice Huston
parent 195c1facd8
commit 009cbc6164
2 changed files with 15 additions and 20 deletions

View File

@ -128,12 +128,12 @@
... ...
}@inputs: }@inputs:
let let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
inherit (self) outputs;
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]; ];
forEachSystem = lib.genAttrs systems; forEachSystem = lib.genAttrs systems;
@ -167,24 +167,6 @@
[ ]; [ ];
fileList = dir: map (file: ./. + "/${dir}/${file}") (ls dir); fileList = dir: map (file: ./. + "/${dir}/${file}") (ls dir);
recursiveMerge =
attrList:
let
f =
attrPath:
builtins.zipAttrsWith (
n: values:
if builtins.tail values == [ ] then
builtins.head values
else if builtins.all builtins.isList values then
lib.unique (builtins.concatLists values)
else if builtins.all builtins.isAttrs values then
f (attrPath ++ [ n ]) values
else
lib.last values
);
in
f [ ] attrList;
config = { config = {
repos = [ repos = [
@ -221,6 +203,9 @@
}; };
in in
{ {
inherit (self) outputs;
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style); formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
nixosConfigurations = nixosConfigurations =
@ -354,4 +339,5 @@
} }
) sops-nix.packages; ) sops-nix.packages;
}; };
} }

9
hydra.nix Normal file
View File

@ -0,0 +1,9 @@
{ inputs, outputs }:
let
inherit (inputs.nixpkgs.lib) mapAttrs;
getCfg = _: cfg: cfg.config.system.build.toplevel;
in
{
hosts = mapAttrs getCfg outputs.nixosConfigurations;
}