infra/modules/nixos/hercules-ci/default.nix

24 lines
625 B
Nix
Raw Normal View History

{ config, ... }:
let
herculesSecret = {
owner = "hercules-ci-agent";
sopsFile = ./secrets.yaml;
};
2023-01-01 15:30:41 +01:00
inherit (config.sops) secrets;
2022-08-14 16:49:30 +02:00
in
{
sops.secrets."binary-caches.json" = herculesSecret;
sops.secrets."cluster-join-token.key" = herculesSecret;
sops.secrets."hercules-secrets" = herculesSecret;
services.hercules-ci-agent = {
enable = true;
settings = {
binaryCachesPath = secrets."binary-caches.json".path;
clusterJoinTokenPath = secrets."cluster-join-token.key".path;
# secrets file is needed for effects
secretsJsonPath = secrets."hercules-secrets".path;
};
};
}