aboutsummaryrefslogtreecommitdiff
path: root/modules/services/nixos/ngircd.nix
blob: 014dd68028a0d39e9067940a99e4f57129248824 (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
{
  config,
  lib,
  ...
}: let
  cfg = config.collinux.services.ngircd;
in
  lib.mkIf cfg.enable {
    services.ngircd = {
      enable = true;
      config = ''
        [Global]
          Name = irc.williamsfam.us.com
          Info = Ganymede IRC Chat
          AdminInfo1 = Collin

          Listen = 127.0.0.1
          Ports = ${toString cfg.port}

        [Options]
          PAM = yes
          PAMIsOptional = no

        [Operator]
          Name = collin
          Password =  # users authenticate with PAM
          Mask = *@*
      '';
    };

    users.users.ngircd.extraGroups = ["shadow"];

    security.pam.services.ngircd = {
      unixAuth = true;
    };
  }