nixos/modules/nixos/postgres.nix
2024-06-21 20:03:49 -04:00

19 lines
436 B
Nix

{ pkgs, ... }:
{
services.postgresql = {
enable = true;
ensureDatabases = [ "mydatabase" ];
enableTCPIP = true;
port = 5432;
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser origin-address auth-method
local all all trust
# ipv4
host all all 127.0.0.1/32 trust
# ipv6
host all all ::1/128 trust
'';
};
}