diff --git a/hosts/defiant/services/gitea.nix b/hosts/defiant/services/gitea.nix index 9781829..a6b8d58 100644 --- a/hosts/defiant/services/gitea.nix +++ b/hosts/defiant/services/gitea.nix @@ -58,5 +58,7 @@ in { systemd.services.gitea.serviceConfig.WorkingDirectory = lib.mkForce "${cfg.stateDir}/work"; + services.postgresqlBackup.databases = [ "gitea" ]; + networking.firewall.allowedTCPPorts = [ sshPort ]; } diff --git a/hosts/defiant/services/hedgedoc.nix b/hosts/defiant/services/hedgedoc.nix index e5b50ce..e335561 100644 --- a/hosts/defiant/services/hedgedoc.nix +++ b/hosts/defiant/services/hedgedoc.nix @@ -95,6 +95,8 @@ in { }]; }; + services.postgresqlBackup.databases = [ "hedgedoc" ]; + services.nginx.virtualHosts."${domain}" = { listen = [ { addr = "192.168.10.175"; port = 43443; ssl = true; } diff --git a/hosts/defiant/services/matrix/synapse.nix b/hosts/defiant/services/matrix/synapse.nix index f534cff..6dc2397 100644 --- a/hosts/defiant/services/matrix/synapse.nix +++ b/hosts/defiant/services/matrix/synapse.nix @@ -72,6 +72,8 @@ }; }; + services.postgresqlBackup.databases = [ "matrix-synapse" ]; + services.redis.servers."".enable = true; services.nginx.virtualHosts."matrix.feal.no" = { diff --git a/hosts/defiant/services/postgresql.nix b/hosts/defiant/services/postgresql.nix index a8d8d4f..0336210 100644 --- a/hosts/defiant/services/postgresql.nix +++ b/hosts/defiant/services/postgresql.nix @@ -6,10 +6,12 @@ }; services.postgresqlBackup = { - # enable = true; + enable = true; location = "/data/backup/postgresql/"; startAt = "*-*-* 03:15:00"; - backupAll = true; + + # Each service is registered in its own configuration file + databases = [ ]; }; environment.systemPackages = [ config.services.postgresql.package ]; diff --git a/hosts/defiant/services/vaultwarden.nix b/hosts/defiant/services/vaultwarden.nix index 856c9fd..993be18 100644 --- a/hosts/defiant/services/vaultwarden.nix +++ b/hosts/defiant/services/vaultwarden.nix @@ -35,6 +35,8 @@ in { }]; }; + services.postgresqlBackup.databases = [ "vaultwarden" ]; + services.nginx.virtualHosts."${domain}" = { forceSSL = true; enableACME = true;