diff options
| author | seth <[email protected]> | 2023-09-06 17:50:22 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-09-07 13:52:26 -0400 |
| commit | 5d0fdf984a2708ad746669814ac874d6f7ad44b4 (patch) | |
| tree | 68689d7bf6c8c1cbf3304031e447eb5524d5de11 | |
| parent | d113e8978e4be8041ae1136a487fe0f9ca48ce58 (diff) | |
!hercules-ci->garnix (again)
| -rw-r--r-- | garnix.yaml | 7 | ||||
| -rw-r--r-- | hosts/profiles.nix | 20 | ||||
| -rw-r--r-- | modules/shared/base/nix.nix | 11 | ||||
| -rw-r--r-- | parts/ci.nix | 78 | ||||
| -rw-r--r-- | parts/default.nix | 1 |
5 files changed, 9 insertions, 108 deletions
diff --git a/garnix.yaml b/garnix.yaml new file mode 100644 index 0000000..bbc3681 --- /dev/null +++ b/garnix.yaml @@ -0,0 +1,7 @@ +builds: + exclude: [] + include: + - "checks.x86_64-linux.*" + - "devShells.x86_64-linux.default" + - "nixosConfigurations.*" + - "homeConfigurations.seth" diff --git a/hosts/profiles.nix b/hosts/profiles.nix index 6eef5ed..59ab599 100644 --- a/hosts/profiles.nix +++ b/hosts/profiles.nix @@ -78,26 +78,6 @@ in { server = { enable = true; secrets.enable = true; - services = { - hercules-ci = { - enable = true; - secrets.enable = true; - }; - - promtail = { - enable = true; - clients = [ - { - url = "http://p-body:3030/loki/api/v1/push"; - } - ]; - }; - }; - }; - - services.prometheus.exporters.node = { - enable = true; - enabledCollectors = ["systemd"]; }; nix.registry.n.flake = nixpkgs-stable; diff --git a/modules/shared/base/nix.nix b/modules/shared/base/nix.nix index d1b7e60..2c95933 100644 --- a/modules/shared/base/nix.nix +++ b/modules/shared/base/nix.nix @@ -24,15 +24,8 @@ in { auto-optimise-store = isLinux; experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "repl-flake"]; - trusted-substituters = [ - "https://getchoo.cachix.org" - "https://nix-community.cachix.org" - ]; - - trusted-public-keys = [ - "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + trusted-substituters = ["https://cache.garnix.io"]; + trusted-public-keys = ["cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="]; }; gc = { diff --git a/parts/ci.nix b/parts/ci.nix deleted file mode 100644 index d2434e8..0000000 --- a/parts/ci.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ - config, - inputs, - self, - withSystem, - ... -}: let - ciSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; -in { - imports = [ - inputs.effects.flakeModule - ]; - - herculesCI = {lib, ...} @ herculesCI: { - inherit ciSystems; - - onPush.default = let - inherit (builtins) elem; - inherit (lib) filterAttrs mapAttrs mkForce; - - amd64 = ["x86_64-linux"]; - - findCompatible = systems: filterAttrs (s: _: elem s systems); - findCompatibleCfgs = systems: filterAttrs (_: v: elem v.pkgs.system systems); - buildCfgs = mapAttrs (_: v: v.config.system.build.toplevel); - buildHMUsers = mapAttrs (_: v: v.activationPackage); - #evalCfgs = mapAttrs (_: v: seq v.config.system.build.toplevel v.pkgs.emptyFile); - in - mkForce { - outputs = { - checks = findCompatible amd64 self.checks; - devShells = findCompatible amd64 self.devShells; - homeConfigurations = buildHMUsers (findCompatibleCfgs amd64 self.homeConfigurations); - nixosConfigurations = buildCfgs (findCompatibleCfgs ciSystems self.nixosConfigurations); - }; - }; - - onSchedule = let - when = { - hour = [0]; - minute = 0; - }; - - mkUpdateEffect = 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; - module = cfg.effect.settings; - inherit pullRequestTitle inputs; - inherit (cfg) updateBranch forgeType createPullRequest pullRequestBody; - }); - in { - nixpkgs-update = { - inherit when; - - outputs.effects = { - nixpkgs-update = mkUpdateEffect ["nixpkgs" "nixpkgs-stable"] "flake: update nixpkgs inputs"; - }; - }; - - flake-update = { - when = when // {dayOfMonth = [1 8 15 22 29];}; - - outputs.effects = { - flake-update = mkUpdateEffect [] "flake: update all inputs"; - }; - }; - }; - }; -} diff --git a/parts/default.nix b/parts/default.nix index c382e21..3626f4a 100644 --- a/parts/default.nix +++ b/parts/default.nix @@ -1,6 +1,5 @@ _: { imports = [ - ./ci.nix ./deploy.nix ./dev.nix ./lib |
