summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-07-03 13:56:06 +0100
committerGitHub <noreply@github.com>2018-07-03 13:56:06 +0100
commited209182788e3496993089fe869f8a5e9ab7ae30 (patch)
treef4e7460f764df894923936209b426a3362e51646 /nixos/modules/services
parent1a76bd555271a04aab75e8e90ef6e42d9fec7dcd (diff)
parent32e982448d055ad2f2536f687da92a8017a24f8e (diff)
downloadnixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar.gz
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar.bz2
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar.lz
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar.xz
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.tar.zst
nixlib-ed209182788e3496993089fe869f8a5e9ab7ae30.zip
Merge pull request #42896 from sorki/gpsd_nowait
nixos/gpsd-service: add services.gpsd.nowait option
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/misc/gpsd.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gpsd.nix b/nixos/modules/services/misc/gpsd.nix
index 71de08609073..3bfcb636a3c6 100644
--- a/nixos/modules/services/misc/gpsd.nix
+++ b/nixos/modules/services/misc/gpsd.nix
@@ -53,6 +53,14 @@ in
         '';
       };
 
+      nowait = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          don't wait for client connects to poll GPS
+        '';
+      };
+
       port = mkOption {
         type = types.int;
         default = 2947;
@@ -99,7 +107,8 @@ in
         ExecStart = ''
           ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}"  \
             -S "${toString cfg.port}"                             \
-            ${if cfg.readonly then "-b" else ""}                  \
+            ${optionalString cfg.readonly "-b"}                   \
+            ${optionalString cfg.nowait "-n"}                     \
             "${cfg.device}"
         '';
       };