2022-12-04 16:10:00 +00:00
|
|
|
{...}: {
|
2022-11-17 22:25:41 +00:00
|
|
|
services.secrets = {
|
|
|
|
enable = true;
|
|
|
|
secrets = {
|
|
|
|
restic_password = {
|
|
|
|
fetchScript = ''
|
|
|
|
simple_get "/private-public-keys/restic/Vault" .password > $secretFile
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
restic_env = {
|
|
|
|
fetchScript = ''
|
|
|
|
RESTIC_USERNAME=$(simple_get "/api-keys/storage/restic/Vault" .username)
|
|
|
|
RESTIC_PASSWORD=$(simple_get "/api-keys/storage/restic/Vault" .password)
|
|
|
|
echo "RESTIC_REPOSITORY=rest:https://$RESTIC_USERNAME:$RESTIC_PASSWORD@storage-restic.owo.monster/Vault" > $secretFile
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
wg_priv = {
|
|
|
|
fetchScript = ''
|
|
|
|
simple_get "/private-public-keys/wireguard/chaos-internal/vault" .private > $secretFile
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
wg_preshared_hetzner-vm = {
|
|
|
|
fetchScript = ''
|
|
|
|
simple_get "/private-public-keys/wireguard/chaos-internal/vault" .preshared_keys.hetzner_vm > $secretFile
|
|
|
|
'';
|
|
|
|
};
|
2023-08-09 20:53:22 +01:00
|
|
|
wg_preshared_iphone8 = {
|
2022-11-17 22:25:41 +00:00
|
|
|
fetchScript = ''
|
2023-08-09 20:53:22 +01:00
|
|
|
simple_get "/private-public-keys/wireguard/chaos-internal/vault" .preshared_keys.iphone8 > $secretFile
|
2022-11-17 22:25:41 +00:00
|
|
|
'';
|
|
|
|
};
|
2023-08-09 20:53:22 +01:00
|
|
|
wg_preshared_lappy-t495 = {
|
2022-11-17 22:25:41 +00:00
|
|
|
fetchScript = ''
|
2023-08-09 20:53:22 +01:00
|
|
|
simple_get "/private-public-keys/wireguard/chaos-internal/vault" ".preshared_keys.lappy_t495" > $secretFile
|
2022-11-17 22:25:41 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-02 10:24:47 +00:00
|
|
|
}
|