From 630934a2631d9429b4e46c1b6ec0f6640f332384 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 22 May 2023 02:35:15 -0400 Subject: !hercules-ci -> hydra --- modules/flake/ci.nix | 67 +++++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 50 deletions(-) (limited to 'modules/flake/ci.nix') diff --git a/modules/flake/ci.nix b/modules/flake/ci.nix index 91dc397..9f4e58d 100644 --- a/modules/flake/ci.nix +++ b/modules/flake/ci.nix @@ -1,56 +1,23 @@ { + myLib, self, - inputs, ... -}: let - inherit (inputs) hercules-ci-effects nixpkgs; -in { - imports = [ - hercules-ci-effects.flakeModule - ]; - - hercules-ci = { - flake-update = { - enable = true; - when = { - hour = [0]; - minute = 0; +}: { + flake = { + hydraJobs = let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + ]; + in + with (myLib.my.ci supportedSystems); { + apps = mkCompatibleApps self.apps; + checks = mkCompatible self.checks; + devShells = mkCompatible self.devShells; + formatter = mkCompatibleFormatters self.formatter; + homeConfigurations = mkCompatibleHM self.homeConfigurations; + packages = mkCompatiblePkgs self.packages; + hosts = mkCompatibleCfg self.nixosConfigurations; }; - }; - }; - - herculesCI = let - inherit - (import - (hercules-ci-effects + "/vendor/hercules-ci-agent/default-herculesCI-for-flake.nix")) - flakeToOutputs - ; - in rec { - ciSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - - onPush = { - default = { - outputs = with builtins; - with nixpkgs.lib; let - # use defaults, but only evaluate hosts - defaults = - removeAttrs - (flakeToOutputs self { - ciSystems = genAttrs ciSystems (_: {}); - }) - ["nixosConfigurations" "packages"]; - - evaluate = mapAttrs (_: v: - seq - v.config.system.build.toplevel - v._module.args.pkgs.emptyFile) - self.nixosConfigurations; - in - mkForce (defaults // evaluate); - }; - }; }; } -- cgit v1.2.3