50 lines
1 KiB
Nix
50 lines
1 KiB
Nix
|
{pkgs, ...}: {
|
||
|
services.secrets = {
|
||
|
enable = true;
|
||
|
|
||
|
packages = with pkgs; [
|
||
|
apacheHttpd
|
||
|
];
|
||
|
|
||
|
vaultLogin = {
|
||
|
enable = true;
|
||
|
loginUsername = "hetzner-arm-container-rss";
|
||
|
};
|
||
|
|
||
|
autoSecrets = {
|
||
|
enable = true;
|
||
|
};
|
||
|
|
||
|
requiredVaultPaths = [
|
||
|
"passwords/data/freshrss"
|
||
|
|
||
|
"api-keys/data/storage/restic/RSS"
|
||
|
"private-public-keys/data/restic/RSS"
|
||
|
];
|
||
|
|
||
|
secrets = {
|
||
|
vault_password = {
|
||
|
manual = true;
|
||
|
};
|
||
|
|
||
|
chaos_password = {
|
||
|
fetchScript = ''
|
||
|
simple_get "/passwords/freshrss" .password > "$secretFile"
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
restic_password = {
|
||
|
fetchScript = ''
|
||
|
simple_get "/private-public-keys/restic/RSS" .password > "$secretFile"
|
||
|
'';
|
||
|
};
|
||
|
restic_env = {
|
||
|
fetchScript = ''
|
||
|
RESTIC_PASSWORD=$(simple_get "/api-keys/storage/restic/RSS" .restic)
|
||
|
echo "RESTIC_REPOSITORY=rest:https://restic:$RESTIC_PASSWORD@storage-restic.owo.monster/TSS" > "$secretFile"
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|