nix-config/nixos/modules/profiles/backup.nix
2024-12-08 13:03:45 +01:00

26 lines
1.1 KiB
Nix

{ config, lib, ... }:
let
secretsPath = config.dadada.secrets.path;
in
{
dadada.backupClient.bs = {
enable = lib.mkDefault false;
passphrasePath = config.age.secrets."${config.networking.hostName}-backup-passphrase".path;
sshIdentityFile = config.age.secrets."${config.networking.hostName}-backup-ssh-key".path;
};
dadada.backupClient.backup1 = {
enable = lib.mkDefault true;
passphrasePath = config.age.secrets."${config.networking.hostName}-backup-passphrase".path;
sshIdentityFile = config.age.secrets."${config.networking.hostName}-backup-ssh-key".path;
};
dadada.backupClient.backup2 = {
enable = lib.mkDefault false;
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 = "${secretsPath}/${config.networking.hostName}-backup-passphrase.age";
age.secrets."${config.networking.hostName}-backup-ssh-key".file = "${secretsPath}/${config.networking.hostName}-backup-ssh-key.age";
}