diff --git a/modules/nixos-wiki/backup.nix b/modules/nixos-wiki/backup.nix index a493f68..57d0b23 100644 --- a/modules/nixos-wiki/backup.nix +++ b/modules/nixos-wiki/backup.nix @@ -17,12 +17,12 @@ let { name = "wiki-backup"; runtimeInputs = [ - pkgs.postgresql + config.services.postgresql.package pkgs.util-linux ]; text = '' mkdir -p /var/lib/mediawiki/backup/ - runuser -u postgres -- pg_dump --format=custom mediawiki > /var/lib/mediawiki/backup/db.tmp + runuser -u postgres -- pg_dump --compress=zstd --format=custom mediawiki > /var/lib/mediawiki/backup/db.tmp mv /var/lib/mediawiki/backup/{db.tmp,db} ''; }; @@ -46,7 +46,7 @@ let old-wiki-restore = pkgs.writeShellApplication { name = "old-wiki-restore"; runtimeInputs = [ - pkgs.postgresql + config.services.postgresql.package pkgs.coreutils pkgs.util-linux mediawiki-maintenance diff --git a/modules/nixos-wiki/default.nix b/modules/nixos-wiki/default.nix index 51b52a8..90df4e8 100644 --- a/modules/nixos-wiki/default.nix +++ b/modules/nixos-wiki/default.nix @@ -127,6 +127,8 @@ in ''; }; + services.postgresql.package = pkgs.postgresql_16; + networking.firewall.allowedTCPPorts = [ 443 80 ]; security.acme.acceptTerms = true; services.nginx.virtualHosts.${config.services.mediawiki.nginx.hostName} = {