1
0
Fork 0
dotfiles/system/nixos/postgresql.nix

29 lines
534 B
Nix

{ pkgs, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_15_jit;
enableJIT = true;
enableTCPIP = true;
settings = {
full_page_writes = "off";
wal_init_zero = "off";
wal_recycle = "off";
track_activities = "on";
track_counts = "on";
autovacuum = "on";
};
authentication = ''
host all all 100.64.10.3/32 md5
host all all 10.88.0.0/16 md5
'';
};
networking.firewall.interfaces."tailscale0".allowedTCPPorts = [ 5432 ];
}