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 92 ''; 93 93 }; 94 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 + 95 105 }; 96 106 97 107 }; ··· 117 127 Type = "forking"; 118 128 ExecStart = let 119 129 devices = utils.escapeSystemdExecArgs cfg.devices; 130 + extraArgs = utils.escapeSystemdExecArgs cfg.extraArgs; 120 131 in '' 121 132 ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \ 122 133 -S "${toString cfg.port}" \ 123 134 ${optionalString cfg.readonly "-b"} \ 124 135 ${optionalString cfg.nowait "-n"} \ 125 136 ${optionalString cfg.listenany "-G"} \ 137 + ${extraArgs} \ 126 138 ${devices} 127 139 ''; 128 140 };