2024-03-09 22:18:26 +00:00
|
|
|
{...}: {
|
2023-10-27 17:44:32 +01:00
|
|
|
services.secrets = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
vaultLogin = {
|
|
|
|
enable = true;
|
|
|
|
loginUsername = "hetzner-arm-container-owncast";
|
|
|
|
};
|
|
|
|
|
|
|
|
autoSecrets = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
requiredVaultPaths = [
|
|
|
|
"api-keys/data/storage/restic/Owncast"
|
|
|
|
"private-public-keys/data/restic/Owncast"
|
|
|
|
];
|
|
|
|
|
|
|
|
secrets = {
|
|
|
|
vault_password = {
|
|
|
|
manual = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
restic_password = {
|
|
|
|
fetchScript = ''
|
|
|
|
simple_get "/private-public-keys/restic/Owncast" .password > "$secretFile"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
restic_env = {
|
|
|
|
fetchScript = ''
|
|
|
|
RESTIC_PASSWORD=$(simple_get "/api-keys/storage/restic/Owncast" .restic)
|
|
|
|
echo "RESTIC_REPOSITORY=rest:https://restic:$RESTIC_PASSWORD@storage-restic.owo.monster/Owncast" > "$secretFile"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|