From 92f69f15441b8a5d9d178ca69aae8e54d99e36f1 Mon Sep 17 00:00:00 2001 From: cinereal Date: Sat, 26 Jul 2025 10:26:27 +0200 Subject: [PATCH] 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. --- pkgs/by-name/gh/ghostunnel/service.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gh/ghostunnel/service.nix b/pkgs/by-name/gh/ghostunnel/service.nix index 218b783629b2..485ce30fc8e0 100644 --- a/pkgs/by-name/gh/ghostunnel/service.nix +++ b/pkgs/by-name/gh/ghostunnel/service.nix @@ -220,7 +220,8 @@ in ++ optional cfg.unsafeTarget "--unsafe-target" ++ cfg.extraArguments; }; - + } + // lib.optionalAttrs (options ? systemd) { # refine the service systemd.service = { after = [ "network.target" ];