diff --git a/machines/hiroshi/configuration.nix b/machines/hiroshi/configuration.nix index 7eddba1..20fbf75 100644 --- a/machines/hiroshi/configuration.nix +++ b/machines/hiroshi/configuration.nix @@ -2,6 +2,8 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later +{ pkgs, ... }: + { imports = [ ./hardware-configuration.nix @@ -30,4 +32,20 @@ system.stateVersion = "24.05"; networking.firewall.allowedTCPPorts = [ 80 443 ]; + + services.postgresql = { + enable = true; + package = pkgs.postgresql_16; + }; + + services.postgresqlBackup = { + enable = true; + startAt = [ ]; # triggered by restic system backup + location = "/var/lib/postgresql-backup"; + compression = "none"; + }; + systemd.services.restic-backups-system = { + after = [ "postgresqlBackup.service" ]; + wants = [ "postgresqlBackup.service" ]; + }; }