hiroshi: Add postgresql
This commit is contained in:
parent
aa0d1752f6
commit
c65077a15b
|
@ -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" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue