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.
28 lines
491 B
Nix
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"}
|
|
'';
|
|
};
|
|
}
|