From 009cbc6164627d74130881043b0d64aef42f9eb8 Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Wed, 17 Apr 2024 20:51:36 -0400 Subject: [PATCH] hydra updates! Signed-off-by: ahuston-0 --- flake.nix | 26 ++++++-------------------- hydra.nix | 9 +++++++++ 2 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 hydra.nix diff --git a/flake.nix b/flake.nix index ed96a35..eeef114 100644 --- a/flake.nix +++ b/flake.nix @@ -128,12 +128,12 @@ ... }@inputs: let + inherit (nixpkgs) lib; + inherit (self) outputs; systems = [ "x86_64-linux" "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" ]; forEachSystem = lib.genAttrs systems; @@ -167,24 +167,6 @@ [ ]; 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 = { repos = [ @@ -221,6 +203,9 @@ }; in { + inherit (self) outputs; + hydraJobs = import ./hydra.nix { inherit inputs outputs; }; + formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style); nixosConfigurations = @@ -354,4 +339,5 @@ } ) sops-nix.packages; }; + } diff --git a/hydra.nix b/hydra.nix new file mode 100644 index 0000000..b3121b9 --- /dev/null +++ b/hydra.nix @@ -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; +}