nixos/gpsd-service: add services.gpsd.nowait option

This commit is contained in:
Richard Marko 2018-07-03 00:40:57 +02:00
parent d769256997
commit 57ed52d61f

View File

@ -53,6 +53,14 @@ in
''; '';
}; };
nowait = mkOption {
type = types.bool;
default = false;
description = ''
don't wait for client connects to poll GPS
'';
};
port = mkOption { port = mkOption {
type = types.int; type = types.int;
default = 2947; default = 2947;
@ -100,6 +108,7 @@ in
${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 ""} \ ${if cfg.readonly then "-b" else ""} \
${if cfg.nowait then "-n" else ""} \
"${cfg.device}" "${cfg.device}"
''; '';
}; };