fix(borg): allow remote backups without strict checking
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-03-05 11:32:53 -05:00
parent dc451e1dc7
commit 8a4aec5d60

View file

@ -206,10 +206,6 @@ in {
} }
]; ];
programs.ssh.knownHosts = {
nos.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/4mrp8E4Ittwg8feRmPtDHSDR2+Pq4uZHeF5MweVcW";
};
services.borgbackup = let services.borgbackup = let
backupDir = "/data/borgbackups"; backupDir = "/data/borgbackups";
in { in {
@ -236,7 +232,11 @@ in {
snapPath = "${pathPrefix}/${n}"; snapPath = "${pathPrefix}/${n}";
in in
{ {
environment = v.environment // (mkIf (hostName != "nos") {BORG_RSH = "ssh -i ${secrets.borg-ssh.path}";}); environment =
v.environment
// (mkIf (hostName != "nos") {
BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i ${secrets.borg-ssh.path}";
});
paths = map (x: snapPath + x) v.paths; paths = map (x: snapPath + x) v.paths;
@ -258,7 +258,7 @@ in {
repo = repo =
if (hostName != "nos") if (hostName != "nos")
then "ssh://matt@nos${backupDir}/${v.repo}" then "ssh://borg@nos${backupDir}/${v.repo}"
else "${backupDir}/${v.repo}"; else "${backupDir}/${v.repo}";
} }
// otherAttrs) // otherAttrs)