diff --git a/hosts/plover/default.nix b/hosts/plover/default.nix index e72690db..b7ed6136 100644 --- a/hosts/plover/default.nix +++ b/hosts/plover/default.nix @@ -196,20 +196,8 @@ in services-backup = jobCommonSettings { paths = [ - # Vaultwarden. - "/var/lib/bitwarden_rs" - - # Gitea. - config.services.gitea.dump.backupDir - - # PostgreSQL database dumps. - config.services.postgresqlBackup.location - - # ACME accounts. - "/var/lib/acme/.lego/accounts" - - # Zone files. - "/etc/bind/zones" + # ACME accounts and TLS certificates + "/var/lib/acme" ]; repo = borgRepo "services"; passCommand = "cat ${config.sops.secrets."plover/borg/repos/services/password".path}"; diff --git a/hosts/plover/modules/services/bind.nix b/hosts/plover/modules/services/bind.nix index 737a4687..ecc69044 100644 --- a/hosts/plover/modules/services/bind.nix +++ b/hosts/plover/modules/services/bind.nix @@ -300,4 +300,7 @@ in filter = named-refused[journalmatch='_SYSTEMD_UNIT=bind.service'] maxretry = 3 ''; + + # Add the following to be backed up. + services.borgbackup.jobs.services-backup.paths = [ zonesDir ]; } diff --git a/hosts/plover/modules/services/gitea.nix b/hosts/plover/modules/services/gitea.nix index 24ede24c..eb3a429e 100644 --- a/hosts/plover/modules/services/gitea.nix +++ b/hosts/plover/modules/services/gitea.nix @@ -207,4 +207,7 @@ in "L+ ${giteaCustomDir}/public/img/logo.svg - - - - ${../../files/gitea/logo.svg}" "L+ ${giteaCustomDir}/public/img/logo.png - - - - ${../../files/gitea/logo.png}" ]; + + # Add the following files to be backed up. + services.borgbackup.jobs.services-backup.paths = [ config.services.gitea.dump.backupDir ]; } diff --git a/hosts/plover/modules/services/postgresql.nix b/hosts/plover/modules/services/postgresql.nix index 29406881..73a1cc2f 100644 --- a/hosts/plover/modules/services/postgresql.nix +++ b/hosts/plover/modules/services/postgresql.nix @@ -75,4 +75,7 @@ in security.acme.certs."${postgresqlDomain}".postRun = '' systemctl restart postgresql.service ''; + + # Add the dumps to be backed up. + services.borgbackup.jobs.services-backup.paths = [ config.services.postgresqlBackup.location ]; } diff --git a/hosts/plover/modules/services/vaultwarden.nix b/hosts/plover/modules/services/vaultwarden.nix index 18d996f7..916b2052 100644 --- a/hosts/plover/modules/services/vaultwarden.nix +++ b/hosts/plover/modules/services/vaultwarden.nix @@ -195,4 +195,7 @@ in ignoreregex = ''; }; + + # Add the data directory to be backed up. + services.borgbackup.jobs.services-backup.paths = [ "/var/lib/bitwarden_rs" ]; }