wynne: enable postgresql
This commit is contained in:
parent
07accef599
commit
36ed3c73b5
2 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [ ../../../shared/prometheus-exporters.nix ];
|
imports = [
|
||||||
|
./postgresql.nix
|
||||||
|
../../../shared/prometheus-exporters.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
18
hosts/wynne/services/apps/postgresql.nix
Normal file
18
hosts/wynne/services/apps/postgresql.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
services = {
|
||||||
|
postgresql = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = "/mnt/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
|
local all all trust
|
||||||
|
host all all 127.0.0.1/8 trust
|
||||||
|
host all all ::1/128 trust
|
||||||
|
host all all 10.10.10.0/24 trust
|
||||||
|
host all all fd7c:585c:c4ae::0/64 trust
|
||||||
|
'';
|
||||||
|
ensureDatabases = [ ];
|
||||||
|
ensureUsers = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services.postgresql.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
|
||||||
|
}
|
Loading…
Reference in a new issue