Archived
Add Gitea read-only token to nix access-tokens for private repo rebuilds
This commit is contained in:
1 parent
419b0f706b
commit
db84a0bcc1
1 file changed
+5
-4
@@ -71,18 +71,19 @@ in
|
|||||||
"root-hashedPassword".neededForUsers = true;
|
"root-hashedPassword".neededForUsers = true;
|
||||||
"nixos-hashedPassword".neededForUsers = true;
|
"nixos-hashedPassword".neededForUsers = true;
|
||||||
"nix-github-token" = { };
|
"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
|
# rendered into a runtime-only file (never touches the Nix store) and
|
||||||
# pulled in via nix.conf's native !include directive.
|
# pulled in via nix.conf's native !include directive.
|
||||||
templates."nix-github-token.conf".content = ''
|
templates."nix-access-tokens.conf".content = ''
|
||||||
access-tokens = github.com=${config.sops.placeholder."nix-github-token"}
|
access-tokens = github.com=${config.sops.placeholder."nix-github-token"} ${vars.giteaDomain}=${config.sops.placeholder."nix-gitea-token"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
!include ${config.sops.templates."nix-github-token.conf".path}
|
!include ${config.sops.templates."nix-access-tokens.conf".path}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|||||||
Reference in new issue
Block a user