config

NixOS config
Log | Files | Refs | README | LICENSE

commit 77a368376ca2674678116c19ab4ba3b3fe32cd78 (tree)
parent 890cea34c06204c2ee10a6ecd6a6ae2da5152319
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Mon, 24 Nov 2025 23:48:34 +0200

fra1-c: back up headscale too

Diffstat:
Mhosts/fra1-c/configuration.nix | 34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

diff --git a/hosts/fra1-c/configuration.nix b/hosts/fra1-c/configuration.nix @@ -13,6 +13,7 @@ in age.secrets = { motiejus-server-passwd-hash.file = ../../secrets/motiejus_server_passwd_hash.age; root-server-passwd-hash.file = ../../secrets/root_server_passwd_hash.age; + borgbackup-password.file = ../../secrets/fwminex/borgbackup-password.age; sasl-passwd.file = ../../secrets/postfix_sasl_passwd.age; ssh8022-server = { file = ../../secrets/ssh8022.age; @@ -111,6 +112,39 @@ in } ]; }; + + btrfsborg = + let + this = "${config.networking.hostName}.${config.networking.domain}"; + rsync-net = "zh2769@zh2769.rsync.net"; + vno3-nk = "borgstor@vno3-nk.jakst.vpn"; + in + { + enable = true; + passwordPath = config.age.secrets.borgbackup-password.path; + sshKeyPath = "/etc/ssh/ssh_host_ed25519_key"; + dirs = + builtins.concatMap + ( + host: + let + prefix = "${host}:${this}"; + in + [ + { + subvolume = "/var/lib"; + repo = "${prefix}-var_lib"; + paths = [ "headscale" ]; + backup_at = "*-*-* 01:00:01 UTC"; + } + ] + ) + [ + rsync-net + vno3-nk + ]; + }; + }; };