2023-09-21 05:06:27 +01:00
|
|
|
{...}: {
|
|
|
|
services.secrets = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
vaultLogin = {
|
|
|
|
enable = true;
|
|
|
|
loginUsername = "hetzner-arm-container-social";
|
|
|
|
};
|
|
|
|
|
|
|
|
autoSecrets = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
requiredVaultPaths = [
|
|
|
|
"private-public-keys/data/restic/Social"
|
|
|
|
|
|
|
|
"api-keys/data/storage/restic/Social"
|
|
|
|
|
|
|
|
"api-keys/data/chaos_mail/gotosocial"
|
|
|
|
];
|
|
|
|
|
|
|
|
secrets = {
|
|
|
|
vault_password = {
|
|
|
|
manual = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
restic_password = {
|
|
|
|
fetchScript = ''
|
|
|
|
simple_get "/private-public-keys/restic/Social" .password > "$secretFile"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
restic_env = {
|
|
|
|
fetchScript = ''
|
2023-10-10 22:22:54 +01:00
|
|
|
RESTIC_PASSWORD=$(simple_get "/api-keys/storage/restic/Social" .restic)
|
|
|
|
echo "RESTIC_REPOSITORY=rest:https://restic:$RESTIC_PASSWORD@storage-restic.owo.monster/Social" > "$secretFile"
|
2023-09-21 05:06:27 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
env_secrets = {
|
|
|
|
fetchScript = ''
|
|
|
|
smtp_password=$(simple_get "/api-keys/chaos_mail/gotosocial" .password)
|
|
|
|
echo "GTS_SMTP_PASSWORD=$smtp_password" > "$secretFile"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|