15 inherit (pkgs) solanum util-linux;
16 cfg = config.services.solanum;
18 configFile = pkgs.writeText "solanum.conf" cfg.config;
29 enable = mkEnableOption "Solanum IRC daemon";
35 name = "irc.example.com";
54 default_split_user_count = 0;
58 Solanum IRC daemon configuration file.
59 check <https://github.com/solanum-ircd/solanum/blob/main/doc/reference.conf> for all options.
63 openFilesLimit = mkOption {
67 Maximum number of open files. Limits the clients and server connections.
72 type = types.nullOr types.lines;
77 Solanum will read its MOTD from `/etc/solanum/ircd.motd`.
78 If set, the value of this option will be written to this path.
88 config = mkIf cfg.enable (
92 environment.etc."solanum/ircd.conf".source = configFile;
94 systemd.services.solanum = {
95 description = "Solanum IRC daemon";
96 after = [ "network.target" ];
97 wantedBy = [ "multi-user.target" ];
98 reloadIfChanged = true;
103 ExecStart = "${solanum}/bin/solanum -foreground -logfile /dev/stdout -configfile /etc/solanum/ircd.conf -pidfile /run/solanum/ircd.pid";
104 ExecReload = "${util-linux}/bin/kill -HUP $MAINPID";
107 StateDirectory = "solanum";
108 RuntimeDirectory = "solanum";
109 LimitNOFILE = "${toString cfg.openFilesLimit}";
115 (mkIf (cfg.motd != null) {
116 environment.etc."solanum/ircd.motd".text = cfg.motd;