nixos-server/services/postgres.nix

29 lines
550 B
Nix
Raw Normal View History

2024-05-24 22:30:04 +02:00
{ pkgs, ... }: {
name = "postgres";
config = {
services.postgresql = {
enable = true;
enableTCPIP = true;
port = 3306;
ensureDatabases = [ "gitea" ];
ensureUsers = [{
name = "gitea";
ensureDBOwnership = true;
}];
authentication = ''
2024-05-24 22:30:04 +02:00
host all all 10.10.0.0/16 trust
'';
};
};
ports = {
tcp = [ 3306 ];
udp = [];
http = null;
};
hosts = [ ];
2024-05-25 01:01:07 +02:00
volumes = [{
name = "postgres-storage";
mountPoint = "/var/lib/postgresql";
}];
2024-05-24 22:30:04 +02:00
}