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.
This commit is contained in:
cinereal
2025-07-26 10:27:40 +02:00
parent 2123be1eea
commit 92f69f1544
+2 -1
View File
@@ -220,7 +220,8 @@ in
++ optional cfg.unsafeTarget "--unsafe-target"
++ cfg.extraArguments;
};
}
// lib.optionalAttrs (options ? systemd) {
# refine the service
systemd.service = {
after = [ "network.target" ];