1 { config, lib, pkgs, ... }:
4 cfg = config.services.inspircd;
6 configFile = pkgs.writeText "inspircd.conf" cfg.config;
10 maintainers = [ lib.maintainers.sternenseemann ];
15 enable = lib.mkEnableOption "InspIRCd";
17 package = lib.mkOption {
18 type = lib.types.package;
19 default = pkgs.inspircd;
20 defaultText = lib.literalExpression "pkgs.inspircd";
21 example = lib.literalExpression "pkgs.inspircdMinimal";
23 The InspIRCd package to use. This is mainly useful
24 to specify an overridden version of the
25 `pkgs.inspircd` dervivation, for
26 example if you want to use a more minimal InspIRCd
27 distribution with less modules enabled or with
28 modules enabled which can't be distributed in binary
29 form due to licensing issues.
33 config = lib.mkOption {
34 type = lib.types.lines;
36 Verbatim `inspircd.conf` file.
37 For a list of options, consult the
38 [InspIRCd documentation](https://docs.inspircd.org/3/configuration/), the
39 [Module documentation](https://docs.inspircd.org/3/modules/)
40 and the example configuration files distributed
41 with `pkgs.inspircd.doc`
47 config = lib.mkIf cfg.enable {
48 systemd.services.inspircd = {
49 description = "InspIRCd - the stable, high-performance and modular Internet Relay Chat Daemon";
50 wantedBy = [ "multi-user.target" ];
51 requires = [ "network.target" ];
56 ${lib.getBin cfg.package}/bin/inspircd start --config ${configFile} --nofork --nopid