mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Merge pull request #258582 from returntoreality/gpsd-extra-args
nixos/gpsd: add extraArgs option
This commit is contained in:
commit
de26e61f7e
@ -92,6 +92,16 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "-r" "-s" "19200" ];
|
||||
description = lib.mdDoc ''
|
||||
A list of extra command line arguments to pass to gpsd.
|
||||
Check gpsd(8) mangpage for possible arguments.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
@ -117,12 +127,14 @@ in {
|
||||
Type = "forking";
|
||||
ExecStart = let
|
||||
devices = utils.escapeSystemdExecArgs cfg.devices;
|
||||
extraArgs = utils.escapeSystemdExecArgs cfg.extraArgs;
|
||||
in ''
|
||||
${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \
|
||||
-S "${toString cfg.port}" \
|
||||
${optionalString cfg.readonly "-b"} \
|
||||
${optionalString cfg.nowait "-n"} \
|
||||
${optionalString cfg.listenany "-G"} \
|
||||
${extraArgs} \
|
||||
${devices}
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user