Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

nixos/gpsd: add extraArgs option

Allows setting addtional arguments to gpsd

+12
+12
nixos/modules/services/misc/gpsd.nix
··· 92 ''; 93 }; 94 95 }; 96 97 }; ··· 117 Type = "forking"; 118 ExecStart = let 119 devices = utils.escapeSystemdExecArgs cfg.devices; 120 in '' 121 ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \ 122 -S "${toString cfg.port}" \ 123 ${optionalString cfg.readonly "-b"} \ 124 ${optionalString cfg.nowait "-n"} \ 125 ${optionalString cfg.listenany "-G"} \ 126 ${devices} 127 ''; 128 };
··· 92 ''; 93 }; 94 95 + extraArgs = mkOption { 96 + type = types.listOf types.str; 97 + default = [ ]; 98 + example = [ "-r" "-s" "19200" ]; 99 + description = lib.mdDoc '' 100 + A list of extra command line arguments to pass to gpsd. 101 + Check gpsd(8) mangpage for possible arguments. 102 + ''; 103 + }; 104 + 105 }; 106 107 }; ··· 127 Type = "forking"; 128 ExecStart = let 129 devices = utils.escapeSystemdExecArgs cfg.devices; 130 + extraArgs = utils.escapeSystemdExecArgs cfg.extraArgs; 131 in '' 132 ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \ 133 -S "${toString cfg.port}" \ 134 ${optionalString cfg.readonly "-b"} \ 135 ${optionalString cfg.nowait "-n"} \ 136 ${optionalString cfg.listenany "-G"} \ 137 + ${extraArgs} \ 138 ${devices} 139 ''; 140 };