(bug): impossible to connect to remote server

This commit is contained in:
Harry 2024-08-25 14:19:54 +02:00
parent 6e87a94b20
commit 83625c3fa0

View file

@ -1,4 +1,9 @@
{ config, secrets, ... }: {
config,
secrets,
pkgs,
...
}:
{ {
imports = [ imports = [
./backups-repos.nix ./backups-repos.nix
@ -8,6 +13,14 @@
sopsFile = "${secrets}/secrets/backup.yaml"; sopsFile = "${secrets}/secrets/backup.yaml";
}; };
sops.secrets.sshBorgOffsiteBackup = {
sopsFile = "${secrets}/secrets/backup.yaml";
};
sops.secrets.borgOffsiteBackupHostKeys = {
sopsFile = "${secrets}/secrets/backup.yaml";
};
services.borgbackup.jobs = { services.borgbackup.jobs = {
/* /*
localBackup = { localBackup = {
@ -71,7 +84,7 @@
]; ];
exclude_patterns = [ "/home/*/.cache" ]; exclude_patterns = [ "/home/*/.cache" ];
encryption_passcommand = "cat /run/secrets/borgRemoteServerPassword"; encryption_passcommand = "cat /run/secrets/borgRemoteServerPassword";
ssh_command = "ssh -i /home/homelab/.ssh/backup/id_ed25519"; ssh_command = "ssh -o GlobalKnownHostsFile=${config.sops.secrets.borgOffsiteBackupHostKeys.path} -i ${config.sops.secrets.sshBorgOffsiteBackup.path}";
}; };
}; };
}; };