diff options
author | Linus Karl <linus@lotz.li> | 2023-02-26 23:04:25 +0100 |
---|---|---|
committer | Linus Karl <linus@lotz.li> | 2023-10-02 15:10:12 +0200 |
commit | 342cc761dfd76ac6caaaafd96b3aac8f0311119a (patch) | |
tree | 8d87f1f1ebc64fe3b36f64ed4ca855f62ab4758e /nixos | |
parent | 58aa6737113478177ad861c2ff20e10bc8ce12af (diff) |
nixos/gpsd: add extraArgs option
Allows setting addtional arguments to gpsd
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/gpsd.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gpsd.nix b/nixos/modules/services/misc/gpsd.nix index ce0f9bb3ba28c..5d2e806181dff 100644 --- a/nixos/modules/services/misc/gpsd.nix +++ b/nixos/modules/services/misc/gpsd.nix @@ -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} ''; }; |