diff options
| author | seth <[email protected]> | 2023-07-02 12:28:11 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-07-02 19:22:19 +0000 |
| commit | 3716419055f11a80c3bab92de343075c15f84be1 (patch) | |
| tree | c449e941587721825fc964abd1feaafb1edc21bd /modules/flake/ci.nix | |
| parent | c71a2c41f4e98b394bebe738d1f582c440d5337e (diff) | |
!hercules-ci -> garnix
Diffstat (limited to 'modules/flake/ci.nix')
| -rw-r--r-- | modules/flake/ci.nix | 78 |
1 files changed, 12 insertions, 66 deletions
diff --git a/modules/flake/ci.nix b/modules/flake/ci.nix index a8dd0c8..c958ed3 100644 --- a/modules/flake/ci.nix +++ b/modules/flake/ci.nix @@ -1,77 +1,23 @@ { - config, inputs, myLib, self, - withSystem, ... }: let - mkUpdateEffect = herculesCI: inputs: pullRequestTitle: let - cfg = config.hercules-ci.flake-update; - in - withSystem cfg.effect.system ({hci-effects, ...}: - hci-effects.flakeUpdate { - gitRemote = herculesCI.config.repo.remoteHttpUrl; - user = "x-access-token"; - autoMergeMethod = "rebase"; - commitSummary = pullRequestTitle; - inherit pullRequestTitle inputs; - inherit (cfg) updateBranch forgeType createPullRequest pullRequestBody; - }); -in { - imports = [ - inputs.hercules-ci-effects.flakeModule + ciSystems = [ + "x86_64-linux" + "aarch64-linux" ]; - herculesCI = {lib, ...} @ herculesCI: let - inherit (lib) mkForce; - ciSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - in { - inherit ciSystems; - - onPush = { - default = { - outputs = with (myLib.ci ciSystems); - mkForce { - apps = mkCompatibleApps self.apps; - checks = mkCompatible self.checks; - devShells = mkCompatible self.devShells; - formatter = mkCompatibleFormatters self.formatter; - # disabled to save storage - #homeConfigurations = mkCompatibleHM self.homeConfigurations; - hosts = mkCompatibleCfg' self.nixosConfigurations; - }; - }; - }; - - onSchedule = let - mkUpdateEffect' = mkUpdateEffect herculesCI; - in { - nixpkgs-update = { - when = { - hour = [0]; - minute = 0; - }; - - outputs = { - effects.nixpkgs-update = mkUpdateEffect' ["nixpkgs" "nixpkgs-stable"] "flake: update nixpkgs inputs"; - }; - }; - - flake-update = mkForce { - when = { - dayOfMonth = [1 8 15 22 29]; - hour = [0]; - minute = 0; - }; + ci = sys: myLib.ci ["${sys}"]; + hm = sys: (ci sys).mkCompatibleHM self.homeConfigurations; + hosts = sys: (ci sys).mkCompatibleCfg self.nixosConfigurations; +in { + flake = { + checks = inputs.nixpkgs.lib.genAttrs ciSystems hosts; + }; - outputs = { - effects.flake-update = mkUpdateEffect' [] "flake: update all inputs"; - }; - }; - }; + perSystem = {system, ...}: { + checks = (hm system).${system}; }; } |
