Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263{ config, lib, pkgs, ...}:{ options = { myService.postgres.enable = lib.mkEnableOption "enable postgres Service"; };
config = lib.mkIf config.myService.postgres.enable { systemd.services.postgresql = { after = [ "docker.service" ]; requires = [ "docker.service" ]; };
services.postgresql = { enable = true;
settings.listen_addresses = pkgs.lib.mkForce "127.0.0.1,192.168.0.202,172.17.0.1";
dataDir = "/srv/postgresql";
ensureDatabases = [ "nextcloud" "modrinth-statistics" "taskline-storage" ];
ensureUsers = [ { name = "nextcloud"; ensureDBOwnership = true; } { name = "modrinth-statistics"; ensureDBOwnership = true; } { name = "taskline-storage"; ensureDBOwnership = true; } { name = "admin"; } ];
authentication = pkgs.lib.mkOverride 10 '' #type database DBuser auth-method
local all all peer
host all all 172.16.0.0/12 scram-sha-256
host all admin 127.0.0.1/32 scram-sha-256 host all admin 192.168.0.0/24 scram-sha-256 host all admin ::1/128 scram-sha-256 ''; }; };}