nixfiles/hosts/hetzner-arm/secrets.nix

39 lines
783 B
Nix
Raw Normal View History

2023-09-20 18:44:24 +01:00
{pkgs, ...}: {
services.secrets = {
enable = true;
vaultLogin = {
enable = true;
loginUsername = "hetzner-arm";
};
autoSecrets = {
enable = true;
2023-09-20 18:53:09 +01:00
#affectedSystemdServices = [
# "wg-quick-wg0"
#];
2023-09-20 18:44:24 +01:00
};
requiredVaultPaths = [
"api-keys/data/gitlab/gitlab_pages_serve"
];
secrets = {
vault_password = {
manual = true;
};
# Used directly by server
# for fetching gitlab static sites
gitlab_env = {
#user = "gitlab_artifacts_sync";
#group = "gitlab_artifacts_sync";
2023-09-20 18:44:24 +01:00
fetchScript = ''
token=$(simple_get "/api-keys/gitlab/gitlab_pages_serve" .token)
echo "GITLAB_TOKEN=$token" > "$secretFile"
'';
};
};
};
}