mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-26 14:45:29 -08:00
22 lines
715 B
Nix
22 lines
715 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
services.postgresql = {
|
|
enable = true;
|
|
enableTCPIP = true;
|
|
ensureDatabases = [ "nextcloud" ];
|
|
ensureUsers = [
|
|
{
|
|
name = "nextcloud";
|
|
ensureDBOwnership = true;
|
|
}
|
|
];
|
|
authentication = lib.mkForce ''
|
|
# TYPE DATABASE USER ADDRESS 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
|
|
''; # address is the computer you are connecting from
|
|
};
|
|
}
|