From 3955eaf45015c9dd8a5a59412bf9c5e47b789a65 Mon Sep 17 00:00:00 2001 From: euxane Date: Sat, 8 Jun 2024 22:34:17 +0200 Subject: [PATCH] nixos/fcgiwrap: improve readability of CLI args --- nixos/modules/services/web-servers/fcgiwrap.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-servers/fcgiwrap.nix b/nixos/modules/services/web-servers/fcgiwrap.nix index e6ebe2317145..fc2339730238 100644 --- a/nixos/modules/services/web-servers/fcgiwrap.nix +++ b/nixos/modules/services/web-servers/fcgiwrap.nix @@ -54,9 +54,13 @@ in { wantedBy = optional (cfg.socket.type != "unix") "multi-user.target"; serviceConfig = { - ExecStart = "${pkgs.fcgiwrap}/sbin/fcgiwrap -c ${builtins.toString cfg.process.prefork} ${ - optionalString (cfg.socket.type != "unix") "-s ${cfg.socket.type}:${cfg.socket.address}" - }"; + ExecStart = '' + ${pkgs.fcgiwrap}/sbin/fcgiwrap ${cli.toGNUCommandLineShell {} ({ + c = cfg.process.prefork; + } // (optionalAttrs (cfg.socket.type != "unix") { + s = "${cfg.socket.type}:${cfg.socket.address}"; + }))} + ''; } // (if cfg.process.user != null && cfg.process.group != null then { User = cfg.process.user; Group = cfg.process.group;