2024-05-25 15:12:56 +02:00
|
|
|
{ pkgs, lib, ... }: {
|
2024-05-24 22:30:04 +02:00
|
|
|
name = "postgres";
|
|
|
|
config = {
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
enableTCPIP = true;
|
|
|
|
port = 3306;
|
|
|
|
ensureDatabases = [ "gitea" ];
|
2024-05-24 22:54:44 +02:00
|
|
|
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;
|
2024-05-25 15:12:56 +02:00
|
|
|
forward = [];
|
2024-05-24 22:30:04 +02:00
|
|
|
};
|
|
|
|
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
|
|
|
}
|