Archived
Add Gitea read-only token to nix access-tokens for private repo rebuilds
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user