Add Gitea read-only token to nix access-tokens for private repo rebuilds

This commit is contained in:
2026-07-30 17:47:22 +10:00
parent 419b0f706b
commit db84a0bcc1
+5 -4
View File
@@ -71,18 +71,19 @@ in
"root-hashedPassword".neededForUsers = true;
"nixos-hashedPassword".neededForUsers = true;
"nix-github-token" = { };
"nix-gitea-token" = { };
};
# nix.conf has no *File-style option for access-tokens, so the token is
# nix.conf has no *File-style option for access-tokens, so tokens are
# rendered into a runtime-only file (never touches the Nix store) and
# pulled in via nix.conf's native !include directive.
templates."nix-github-token.conf".content = ''
access-tokens = github.com=${config.sops.placeholder."nix-github-token"}
templates."nix-access-tokens.conf".content = ''
access-tokens = github.com=${config.sops.placeholder."nix-github-token"} ${vars.giteaDomain}=${config.sops.placeholder."nix-gitea-token"}
'';
};
nix.extraOptions = ''
!include ${config.sops.templates."nix-github-token.conf".path}
!include ${config.sops.templates."nix-access-tokens.conf".path}
'';
users = {