Added: Postgres pg_hba.conf

This commit is contained in:
2026-02-17 22:51:46 +01:00
parent 312c5177d1
commit 8466383f34

View File

@@ -7,7 +7,6 @@
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_15; package = pkgs.postgresql_15;
port = 5432;
enableTCPIP = true; enableTCPIP = true;
# Initial database setup # Initial database setup
@@ -17,6 +16,8 @@
# Raspberry Pi 4 optimized settings (2GB RAM assumed) # Raspberry Pi 4 optimized settings (2GB RAM assumed)
settings = { settings = {
# Should match firewall
port = 5432;
# Memory settings (RPi 4 has limited RAM) # Memory settings (RPi 4 has limited RAM)
shared_buffers = "128MB"; shared_buffers = "128MB";
@@ -50,6 +51,13 @@
cpu_index_tuple_cost = 0.1; cpu_index_tuple_cost = 0.1;
cpu_operator_cost = 0.05; cpu_operator_cost = 0.05;
}; };
authentication = ''
local all all trust
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
host all all 192.168.2.0/24 md5
'';
}; };
# Enable the PostgreSQL service to start on boot # Enable the PostgreSQL service to start on boot