nixos-dotfiles

nixos-dotfiles

https://git.tonybtw.com/nixos-dotfiles.git git://git.tonybtw.com/nixos-dotfiles.git
1,506 bytes raw
1
{config, ...}: {
2
  services.znc = {
3
    enable = true;
4
    openFirewall = true;
5
    mutable = true;
6
    useLegacyConfig = false;
7
    config = {
8
      SSLCertFile = "/var/lib/acme/znc.tonybtw.com/full.pem";
9
      LoadModule = ["webadmin" "adminlog"];
10
      Listener.l = {
11
        Port = 6697;
12
        SSL = true;
13
      };
14
      Listener.http = {
15
        Port = 6680;
16
        SSL = false;
17
        AllowWeb = true;
18
        AllowIRC = false;
19
      };
20
      User.tony = {
21
        Admin = true;
22
        Nick = "tonybtw";
23
        AltNick = "tonybtw_";
24
        Ident = "tony";
25
        RealName = "tony";
26
        LoadModule = ["chansaver" "controlpanel"];
27
        Network.libera = {
28
          Server = "irc.libera.chat +6697";
29
          LoadModule = ["simple_away" "sasl" "nickserv" "log"];
30
          Chan = {
31
            "#technicalrenaissance" = {};
32
          };
33
        };
34
        Pass.password = {
35
          Method = "sha256";
36
          Hash = "97ffb83f9bd78b863e473a271a3a5560d392c8879ae92c8db29a59e42e6d09e0";
37
          Salt = "F-vUQiMO?R0EPUEtk*Gt";
38
        };
39
      };
40
    };
41
  };
42
43
  services.nginx.virtualHosts."znc.tonybtw.com" = {
44
    enableACME = true;
45
    forceSSL = true;
46
    locations."/" = {
47
      proxyPass = "http://127.0.0.1:6680";
48
      extraConfig = ''
49
        proxy_http_version 1.1;
50
        proxy_set_header Host $host;
51
      '';
52
    };
53
  };
54
55
  security.acme.certs."znc.tonybtw.com".group = "znc";
56
  users.users.nginx.extraGroups = ["znc"];
57
58
  networking.firewall.allowedTCPPorts = [6697];
59
}