Add Forgejo API token secret wiring

This commit is contained in:
ltadeu6 2026-05-25 15:34:11 -03:00
parent 2827eb869d
commit 601e410ecf
No known key found for this signature in database
GPG key ID: FB9FDAB6B6F3418D
3 changed files with 20 additions and 1 deletions

View file

@ -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 ];