backup: fix static path with hostname

This commit is contained in:
Felix Buehler 2022-06-16 12:13:58 +02:00
parent 79d728ae88
commit acf56a0981
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ let
}; };
}; };
baseModules = [ baseModules = [
# make flake inputs accessiable in NixOS # make flake inputs accessable in NixOS
{ {
_module.args.self = self; _module.args.self = self;
_module.args.inputs = inputs; _module.args.inputs = inputs;

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
borgbackupPath = "u181505-sub1@u181505-sub1.your-storagebox.de:thinkman/"; borgbackupPath = "u181505-sub1@u181505-sub1.your-storagebox.de";
borgbackupMonitor = { config, pkgs, lib, ... }: with lib; { borgbackupMonitor = { config, pkgs, lib, ... }: with lib; {
key = "borgbackupMonitor"; key = "borgbackupMonitor";
_file = "borgbackupMonitor"; _file = "borgbackupMonitor";
@ -61,7 +61,7 @@ in
passCommand = "cat ${config.sops.secrets.borgbackup_password.path}"; passCommand = "cat ${config.sops.secrets.borgbackup_password.path}";
}; };
environment.BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i ${config.sops.secrets.borgbackup_private_ssh_key.path} -p 23"; environment.BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i ${config.sops.secrets.borgbackup_private_ssh_key.path} -p 23";
repo = borgbackupPath; repo = borgbackupPath + ":${config.networking.hostName}/";
compression = "auto,zstd"; compression = "auto,zstd";
doInit = false; doInit = false;
startAt = "daily"; startAt = "daily";