Add Forgejo API token secret wiring
This commit is contained in:
parent
2827eb869d
commit
601e410ecf
3 changed files with 20 additions and 1 deletions
|
|
@ -173,6 +173,14 @@ in {
|
|||
mode = "0400";
|
||||
};
|
||||
} // lib.optionalAttrs
|
||||
(builtins.pathExists ../../secrets/forgejo_api_token.age) {
|
||||
forgejo_api_token = {
|
||||
file = ../../secrets/forgejo_api_token.age;
|
||||
owner = username;
|
||||
group = "users";
|
||||
mode = "0400";
|
||||
};
|
||||
} // lib.optionalAttrs
|
||||
(builtins.pathExists ../../secrets/minecraft_rcon_password.age) {
|
||||
minecraft_rcon_password.file =
|
||||
../../secrets/minecraft_rcon_password.age;
|
||||
|
|
@ -292,6 +300,9 @@ in {
|
|||
if test -r /run/agenix/openclaw_gateway_token
|
||||
set -gx OPENCLAW_GATEWAY_TOKEN (cat /run/agenix/openclaw_gateway_token)
|
||||
end
|
||||
if test -r /run/agenix/forgejo_api_token
|
||||
set -gx FORGEJO_API_TOKEN (cat /run/agenix/forgejo_api_token)
|
||||
end
|
||||
'';
|
||||
shellAliases = {
|
||||
la = "exa --icons --git";
|
||||
|
|
@ -1154,6 +1165,11 @@ in {
|
|||
export OPENCLAW_GATEWAY_TOKEN="$(cat /run/agenix/openclaw_gateway_token)"
|
||||
fi
|
||||
'';
|
||||
environment.etc."profile.d/forgejo.sh".text = ''
|
||||
if [ -r /run/agenix/forgejo_api_token ]; then
|
||||
export FORGEJO_API_TOKEN="$(cat /run/agenix/forgejo_api_token)"
|
||||
fi
|
||||
'';
|
||||
|
||||
users.groups.libvirtd.members = [ username ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue