nixos/fcgiwrap: improve readability of CLI args

This commit is contained in:
euxane 2024-06-08 22:34:17 +02:00
parent 8101ae41f8
commit 3955eaf450

View File

@ -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;