nixos-dotfiles

nixos-dotfiles

https://git.tonybtw.com/nixos-dotfiles.git git://git.tonybtw.com/nixos-dotfiles.git
1,069 bytes raw
1
# irc.nix
2
{
3
  config,
4
  pkgs,
5
  ...
6
}: {
7
  services.ngircd = {
8
    enable = true;
9
    package = pkgs.ngircd.overrideAttrs (oldAttrs: {
10
      configureFlags = builtins.filter (f: f != "--with-pam") oldAttrs.configureFlags;
11
      buildInputs = builtins.filter (i: i != pkgs.pam) oldAttrs.buildInputs;
12
    });
13
14
    # This becomes ngircd.conf verbatim.
15
    config = ''
16
      [Global]
17
      Name = irc.local
18
      AdminInfo1 = Test IRC
19
      AdminInfo2 = Local instance
20
      MaxNickLength = 16
21
      Listen = 127.0.0.1
22
      Ports = 6667
23
24
      [Channel]
25
      Name = #linux
26
      Topic = Local test
27
    '';
28
  };
29
30
  services.thelounge = {
31
    enable = true;
32
    port = 9000;
33
34
    extraConfig = {
35
      public = false;
36
      reverseProxy = false; # no nginx for local testing
37
38
      defaults = {
39
        name = "localnet";
40
        host = "127.0.0.1";
41
        port = 6667;
42
        tls = false;
43
        nick = "test%%%"; # <= 9 chars incl. suffix
44
        join = "#linux";
45
      };
46
47
      lockNetwork = true;
48
    };
49
  };
50
51
  networking.firewall.allowedTCPPorts = [9000 6667];
52
}