Unverified Commit 92f69f15 authored by cinereal's avatar cinereal
Browse files

ghostunnel: conditional systemd

Make the systemd-specific configuration of `ghostunnel`s service (see
portability](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/development/modular-services.md#portability-modular-service-portability).

The idea here is that making the module easier to use in systems not
using systemd could make for a best practice in writing such modules.
As `ghostunnel` is the first such portable module, it seems all the more
relevant to apply best practices there for when it is used as a source
of inspiration in portable modules for further applications.
parent 2123be1e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -220,7 +220,8 @@ in
        ++ optional cfg.unsafeTarget "--unsafe-target"
        ++ cfg.extraArguments;
    };

  }
  // lib.optionalAttrs (options ? systemd) {
    # refine the service
    systemd.service = {
      after = [ "network.target" ];