gpsd: use optionalString

This commit is contained in:
Jörg Thalheim 2018-07-03 13:55:27 +01:00
parent 57ed52d61f
commit 32e982448d

View File

@ -107,8 +107,8 @@ in
ExecStart = '' ExecStart = ''
${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \ ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \
-S "${toString cfg.port}" \ -S "${toString cfg.port}" \
${if cfg.readonly then "-b" else ""} \ ${optionalString cfg.readonly "-b"} \
${if cfg.nowait then "-n" else ""} \ ${optionalString cfg.nowait "-n"} \
"${cfg.device}" "${cfg.device}"
''; '';
}; };