just a whole bunch of backup changes & move pass and git to vps

This commit is contained in:
2026-08-23 12:12:44 -05:00
parent 9e475209e5
commit a6b7d7f318
2 changed files with 13 additions and 9 deletions
+3 -1
View File
@@ -18,6 +18,7 @@ zstd -dc <path_to_backup> | sudo -u postgres psql -d <database_name> # restore
let
cfg = config.homelab.backups;
sec = config.sops.secrets;
host = config.networking.hostName;
in {
options.homelab.backups = {
enable = lib.mkEnableOption "enables borg backups for state files and db backup services";
@@ -33,7 +34,7 @@ in {
};
backup_repo = lib.mkOption {
type = lib.types.path;
default = "/holocron/archives/homelab";
default = "/holocron/archives/servers/${host}/homelab";
description = "path to take daily backups to with borg!";
};
offsite = lib.mkOption {
@@ -88,6 +89,7 @@ in {
''}
${lib.optionalString cfg.homelab ''
${pkgs.rsync}/bin/rsync -aHAX --partial --numeric-ids --info=progress2,name1,stats2 --delete \
-e "ssh -i /home/blake/.ssh/id_vaniville -o StrictHostKeyChecking=no" \
${toString cfg.backup_repo} \
blake@lumiose:/holocron/archives/servers/vaniville
''}