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.
This commit is contained in:
steffen 2026-03-14 12:43:07 +01:00
parent 086e760b9e
commit 82f3be3b9d
3 changed files with 13 additions and 7 deletions

View file

@ -13,10 +13,16 @@
services.forgejo-runner = {
enable = true;
url = "https://${constants.services.forgejo.fqdn}";
tokenFile = config.sops.secrets."forgejo-runner/token".path;
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"}
'';
};
}