This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
29
services/postgresql/service.nix
Normal file
29
services/postgresql/service.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.machine.postgresql)
|
||||
port
|
||||
enable
|
||||
;
|
||||
in
|
||||
with lib; mkIf enable {
|
||||
services.postgresql = {
|
||||
inherit enable;
|
||||
settings = {
|
||||
inherit port;
|
||||
};
|
||||
ensureDatabases = [ ];
|
||||
enableTCPIP = true;
|
||||
authentication = mkOverride 10 ''
|
||||
#type database DBuser origin-address auth-method
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
host all all 0.0.0.0/0 md5
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue