diff options
Diffstat (limited to 'irc.nix')
-rw-r--r-- | irc.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/irc.nix b/irc.nix index e8592c9..e8bdb09 100644 --- a/irc.nix +++ b/irc.nix @@ -20,7 +20,6 @@ let inherit (config.networking) domain; cert = config.security.acme.certs.${domain}; - port = 6697; in { environment.systemPackages = [ (pkgs.writeTextFile rec { name = "sojupw"; @@ -35,9 +34,21 @@ in { }) ]; networking.firewall.allowedTCPPorts = [ 6697 ]; + services = { + postgresql = { + ensureDatabases = [ "soju" ]; + ensureUsers = [ { + name = "soju"; + ensurePermissions."DATABASE soju" = "ALL PRIVILEGES"; + } ]; + }; + soju = { enable = true; + extraConfig = '' + db postgres "host=/run/postgresql dbname=soju" + ''; hostName = domain; tlsCertificate = "${cert.directory}/cert.pem"; tlsCertificateKey = "${cert.directory}/key.pem"; |