monolith: enable nix cache over ssh

This commit is contained in:
Leonardo Eugênio 2025-06-03 01:15:57 -03:00
parent 3156f59c26
commit 2b6edc0d73
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B
5 changed files with 139 additions and 53 deletions

View file

@ -4,7 +4,7 @@
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner mkNixRunnerFull;
in
{
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
@ -18,7 +18,10 @@ in
thoreb-telemetria-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-telemetria-nix".path;
thoreb-itinerario-nix = mkNixRunner config.sops.secrets."gitlab-runners/thoreb-itinerario-nix".path;
wopus-gitlab-nix = mkNixRunner config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path;
wopus-gitlab-nix = mkNixRunnerFull {
authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path;
nixCacheSshPrivateKeyPath = config.sops.secrets."gitlab-runners/wopus-ssh-nix-cache-pk".path;
};
default = {
# File should contain at least these two variables:
@ -45,5 +48,8 @@ in
"gitlab-runners/wopus-gitlab-nix" = {
sopsFile = ../secrets/monolith/default.yaml;
};
"gitlab-runners/wopus-ssh-nix-cache-pk" = {
sopsFile = ../secrets/monolith/default.yaml;
};
};
}