From 9e199b153a635e6b19488ac61f67a2f7ec54f6ac Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 23 May 2019 13:19:33 -0700 Subject: wip: getting znc to work --- depo/nutin-madaj/web.nix | 2 ++ depo/nutin-madaj/znc.nix | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'depo') diff --git a/depo/nutin-madaj/web.nix b/depo/nutin-madaj/web.nix index b77f4eb..f9dc8b4 100644 --- a/depo/nutin-madaj/web.nix +++ b/depo/nutin-madaj/web.nix @@ -15,6 +15,8 @@ in "bsima.me".root = "/home/ben/public_html/"; "www.bsima.me".root = "/home/ben/public_html/"; "simatime.com".locations."/".root = "/srv/www/"; + "znc.simatime.com".locations."/".proxyPass = "http://localhost/znc/"; + "znc2.simatime.com".locations."/".proxyPass = "http://localhost:5000/znc/"; "hero.simatime.com".locations."/".proxyPass = "http://${bensIp}:3001"; "tv.simatime.com".locations."/".proxyPass = "http://${bensIp}:8096"; # emby runs on port 8096 diff --git a/depo/nutin-madaj/znc.nix b/depo/nutin-madaj/znc.nix index a7623c1..f16a572 100644 --- a/depo/nutin-madaj/znc.nix +++ b/depo/nutin-madaj/znc.nix @@ -1,3 +1,9 @@ +/* + +N.B.: generate znc passwords with 'nix-shell -p znc --command "znc --makepass"' + +*/ + { ... }: { @@ -8,10 +14,20 @@ useLegacyConfig = false; openFirewall = true; config = { - LoadModule = [ "adminlog" "fail2ban" ]; + LoadModule = [ "adminlog" ]; + Listener.l = { + AllowIRC = true; + AllowWeb = true; + Host = "localhost"; + Port = 5000; + IPv4 = true; + IPv6 = true; + SSL = false; # FIXME + URIPrefix = "/znc/"; + }; User.bsima = { Admin = true; - Nick = "bsima"; + Nick = "bsima"; AltNick = "bsima1"; LoadModule = [ "chansaver" "controlpanel" ]; Network.freenode = { Server = "chat.freenode.net +6697"; @@ -31,8 +47,8 @@ }; Pass.password = { Method = "sha256"; - Hash = "4a6703074c713a26d56a906fc9ea82bb591177f10a25a650719266bf588d9525"; - Salt = "QByO-A:4Rbib;dl_3wEH"; + Hash = "879e124fbb75e1bae770ab8e7c8f1fb79650a9d63236006cd5cbc37b1504cd49"; + Salt = "_s66HV-MtmH2tD+Kp*1E"; }; }; }; -- cgit v1.2.3