summaryrefslogtreecommitdiff
path: root/flora/services/znc.nix
blob: e81bc65bf7241487ad443eee4f78140ae311c218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ config, lib, pkgs, ... }:

{
  services.znc = {
    enable = true;
    mutable = false;
    useLegacyConfig = false;
    openFirewall = true;

    config = {
      LoadModule = [ "adminlog" "webadmin" ];
      Listener.l = {
        IPv4 = true;
        IPv6 = false;
        AllowIRC = true;
        AllowWeb = true;
        Port = 12345;
        SSL = true;
      };
      User.stuebinm = {
        Admin = true;
        BindHost = "0.0.0.0";
        LoadModule = [ "chansaver" "controlpanel" "sasl" ];
        QuitMsg = "fell into a looping fixpoint operator";
        RealName = "stuebinm";
        Pass.password = {
          Method = "sha256";
          Hash = "a0dd4be1f8959dc9c775a76779bfb8fab52e43b89bad24d85bdc28caa3499710";
          Salt = "eNT_:x1SgMvQNJAW0J!Q";
        };
        Network.libera = {
          IRCConnectEnabled = true;
          LoadModule = [ "simple_away" "sasl" ];
          Server = [ "irc.libera.chat +6697" ];
          TrustAllCerts = false;
          TrustPKI = true;
        };
      };
    };
  };

  networking.firewall.allowedTCPPorts = [ 12345 ];
}