about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/znc.emile.space.nix
blob: 0ba075137802173e930c41dc74d292fdc3e4ac8a (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ config, pkgs, lib, ... }:

{
  services.nginx.virtualHosts."znc.emile.space" = {
    forceSSL = true;
    enableACME = true;

    locations."/".proxyPass = "http://127.0.0.1:5002";
  };

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

    openFirewall = false;

    modulePackages = with pkgs.zncModules; [
      clientbuffer
      clientaway
      playback
      privmsg
    ];

    config = lib.mkMerge [
      ({
        Version = lib.getVersion pkgs.znc;
        Listener = {
          l = { Port = 5002; SSL = false; AllowWeb = true;  };
          j = { Port = 5001; SSL = true;  AllowWeb = false; };
          LoadModule = [ "webadmin" "adminlog" "playback" "privmsg" ];
          User = {
            emile = {
              Admin = true;
              Nick = "hanemile";
              AltNick = "hanemile_";
              AutoClearChanBuffer = false;
              AutoClearQueryBuffer = false;
              LoadModule = [
                "clientbuffer autoadd"
                "buffextras"
                "clientaway"
              ];
              Network = {
                liberachat = {
                  Server = "irc.libera.char +6697";
                  Nick = "hanemile";
                  AltNick = "hanemile";
                  JoinDelay = 2;
                  LoadModule = [ "simple_away" "nickserv" "cert"];
                };
              };
            };
          };
        };
      })
    ];
    configFile = config.age.secrets.znc-config.path;
  };
}