just a whole bunch of backup changes & move pass and git to vps
This commit is contained in:
@@ -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
|
||||
''}
|
||||
|
||||
Reference in New Issue
Block a user