2023-07-21 11:48:07 +01:00
|
|
|
{...}: {
|
|
|
|
services.secrets = {
|
|
|
|
enable = true;
|
|
|
|
secrets = {
|
2023-09-18 15:40:33 +01:00
|
|
|
usb_encryption_passphrase = {
|
|
|
|
manual = true;
|
|
|
|
};
|
2023-08-01 18:48:59 +01:00
|
|
|
|
2023-07-21 11:48:07 +01:00
|
|
|
music_stream_password = {
|
2023-09-21 05:06:27 +01:00
|
|
|
user = "chaos";
|
2023-07-21 11:48:07 +01:00
|
|
|
group = "users";
|
|
|
|
fetchScript = ''
|
2023-09-11 23:22:18 +01:00
|
|
|
simple_get "/api-keys/music-stream" .password > "$secretFile"
|
2023-07-21 11:48:07 +01:00
|
|
|
'';
|
|
|
|
};
|
2023-08-01 18:48:59 +01:00
|
|
|
|
2023-09-19 17:53:44 +01:00
|
|
|
# Required for home.apps.manualBackupApps
|
2023-08-01 18:48:59 +01:00
|
|
|
restic_music_env = {
|
|
|
|
user = "chaos";
|
|
|
|
fetchScript = ''
|
|
|
|
api_username=$(simple_get "/api-keys/storage/restic/Music" .username)
|
|
|
|
api_password=$(simple_get "/api-keys/storage/restic/Music" .password)
|
|
|
|
restic_password=$(simple_get "/private-public-keys/restic/Music" .password)
|
|
|
|
|
2023-09-11 23:22:18 +01:00
|
|
|
echo > "$secretFile"
|
|
|
|
echo "RESTIC_REPOSITORY=rest:https://''${api_username}:''${api_password}@storage-restic.owo.monster/Music" >> "$secretFile"
|
|
|
|
echo "RESTIC_PASSWORD=''${restic_password}" >> "$secretFile"
|
2023-08-01 18:48:59 +01:00
|
|
|
'';
|
|
|
|
};
|
2023-07-21 11:48:07 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|