Commit 0515216c authored by sternenseemann's avatar sternenseemann
Browse files

nixos/inspircd: sync with upstream systemd.service file

We could in theory just re-use the upstream one, but it sets User=root
which I'm not entirely comfortable with. Instead, add the settings we
were missing from that file here. Sadly, upstream doesn't configure a
syscall filter or similar.
parent 0f560425
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -53,14 +53,22 @@ in
  config = lib.mkIf cfg.enable {
    systemd.services.inspircd = {
      description = "InspIRCd - the stable, high-performance and modular Internet Relay Chat Daemon";
      unitConfig.Documentation = "https://docs.inspircd.org";
      wantedBy = [ "multi-user.target" ];
      requires = [ "network.target" ];

      after = [
        "network.target"
        "network-online.target"
      ];
      wants = [ "network-online.target" ];

      serviceConfig = {
        Type = "simple";
        ExecStart = ''
          ${lib.getBin cfg.package}/bin/inspircd --config ${configFile} --nofork --nopid
        '';
        ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
        Restart = "on-failure";
        DynamicUser = true;
      };
    };