nix-config/nixos/modules/profiles/backup.nix
2022-09-18 17:33:24 +02:00

14 lines
610 B
Nix

{ config, ... }:
let
secretsPath = config.dadada.secrets.path;
in
{
dadada.backupClient.bs = {
enable = true;
passphrasePath = config.age.secrets."${config.networking.hostName}-backup-passphrase.path";
sshIdentityFile = config.age.secrets."${config.networking.hostName}-backup-ssh-key.path";
};
age.secrets."${config.networking.hostName}-backup-passphrase".file = "${toString secretsPath}/${config.networking.hostName}-backup-passphrase.age";
age.secrets."${config.networking.hostName}-backup-ssh-key".file = "${toString secretsPath}/${config.networking.hostName}-backup-ssh-key.age";
}