hosts/fs-01: use borg-config module

This commit is contained in:
2025-08-25 20:03:06 -07:00
parent 3028aa0ade
commit 0462897137

View File

@@ -7,9 +7,6 @@
...
}:
let
backupLabel = "syncthing";
in
{
network.routingType = "dynamic";
network.hardwareAddress = "BC:24:11:38:1C:54";
@@ -22,60 +19,15 @@ in
syncthingserver.enable = true;
services.borgmatic = {
borg-config = {
enable = true;
enableConfigCheck = true;
configurations = {
local = {
source_directories = [ "/mnt/data/syncthing" ];
repositories = [
{
label = backupLabel;
path = "ssh://borg@borg-01.tail755c5.ts.net/./";
}
];
encryption_passcommand = ''cat ${config.sops.secrets."borgmatic_pass/local".path}'';
keep_daily = 7;
keep_weekly = 4;
keep_monthly = 12;
keep_yearly = 3;
unknown_unencrypted_repo_access_is_ok = false;
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
healthchecks = {
ping_url = "https://hc.its-et.me/ping/PlGPBqq-0rLI4N4ya3jYmg/backup-syncthing";
};
};
remote = {
source_directories = [ "/mnt/data/syncthing" ];
repositories = [
{
label = backupLabel;
path = "ssh://fm1833@fm1833.rsync.net/./syncthing";
}
];
encryption_passcommand = ''cat ${config.sops.secrets."borgmatic_pass/remote".path}'';
keep_daily = 7;
keep_weekly = 4;
keep_monthly = 12;
keep_yearly = 3;
unknown_unencrypted_repo_access_is_ok = false;
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
remote_path = "borg14";
healthchecks = {
ping_url = "https://hc.its-et.me/ping/PlGPBqq-0rLI4N4ya3jYmg/backup-syncthing-remote";
};
};
};
backupLabel = "syncthing";
localRepoPath = "ssh://borg@borg-01.tail755c5.ts.net/./";
remoteRepoPath = "ssh://fm1833@fm1833.rsync.net/./syncthing";
sourceDirectories = [ "/mnt/data/syncthing" ];
hcPingUrlLocal = "https://hc.its-et.me/ping/PlGPBqq-0rLI4N4ya3jYmg/backup-syncthing";
hcPingUrlRemote = "https://hc.its-et.me/ping/PlGPBqq-0rLI4N4ya3jYmg/backup-syncthing-remote";
};
base.userSSHKeys = [