cryodev/hosts/cryodev-main/services/forgejo-runner.nix
steffen 82f3be3b9d fix forgejo-runner token: use SOPS template with TOKEN= prefix
The gitea-actions-runner NixOS module expects tokenFile to be an
EnvironmentFile containing TOKEN=<value>, but sops-nix writes only
the raw secret value. Use a sops template to prepend TOKEN= prefix.
2026-03-14 12:43:07 +01:00

28 lines
491 B
Nix

{
config,
outputs,
constants,
...
}:
{
imports = [
outputs.nixosModules.forgejo-runner
];
services.forgejo-runner = {
enable = true;
url = "https://${constants.services.forgejo.fqdn}";
tokenFile = config.sops.templates."forgejo-runner-token".path;
};
sops.secrets."forgejo-runner/token" = {
mode = "0400";
};
sops.templates."forgejo-runner-token" = {
content = ''
TOKEN=${config.sops.placeholder."forgejo-runner/token"}
'';
};
}