9 cfg = config.services.inspircd;
11 configFile = pkgs.writeText "inspircd.conf" cfg.config;
16 maintainers = [ lib.maintainers.sternenseemann ];
21 enable = lib.mkEnableOption "InspIRCd";
23 package = lib.mkOption {
24 type = lib.types.package;
25 default = pkgs.inspircd;
26 defaultText = lib.literalExpression "pkgs.inspircd";
27 example = lib.literalExpression "pkgs.inspircdMinimal";
29 The InspIRCd package to use. This is mainly useful
30 to specify an overridden version of the
31 `pkgs.inspircd` dervivation, for
32 example if you want to use a more minimal InspIRCd
33 distribution with less modules enabled or with
34 modules enabled which can't be distributed in binary
35 form due to licensing issues.
39 config = lib.mkOption {
40 type = lib.types.lines;
42 Verbatim `inspircd.conf` file.
43 For a list of options, consult the
44 [InspIRCd documentation](https://docs.inspircd.org/3/configuration/), the
45 [Module documentation](https://docs.inspircd.org/3/modules/)
46 and the example configuration files distributed
47 with `pkgs.inspircd.doc`
53 config = lib.mkIf cfg.enable {
54 systemd.services.inspircd = {
55 description = "InspIRCd - the stable, high-performance and modular Internet Relay Chat Daemon";
56 wantedBy = [ "multi-user.target" ];
57 requires = [ "network.target" ];
62 ${lib.getBin cfg.package}/bin/inspircd start --config ${configFile} --nofork --nopid