diff --git a/hosts/sarek/configuration.nix b/hosts/sarek/configuration.nix index 39bbd91..b9d21f4 100644 --- a/hosts/sarek/configuration.nix +++ b/hosts/sarek/configuration.nix @@ -6,7 +6,8 @@ (modulesPath + "/virtualisation/proxmox-lxc.nix") ../../base.nix ../../common/metrics-exporters.nix - # ./hardware-configuration.nix + + ./services/postgresql.nix ]; # Boot and console is handled by proxmoxLXC. diff --git a/hosts/sarek/services/postgresql.nix b/hosts/sarek/services/postgresql.nix new file mode 100644 index 0000000..5f73283 --- /dev/null +++ b/hosts/sarek/services/postgresql.nix @@ -0,0 +1,17 @@ +{ config, pkgs, lib, ... }: +{ + services.postgresql = { + enable = true; + enableTCPIP = true; # Expose on the network + }; + + services.postgresqlBackup = { + enable = true; + location = "/backup/postgresql/"; + startAt = "*-*-* 03:15:00"; + backupAll = true; + }; + + + environment.systemPackages = [ config.services.postgresql.package ]; +}