nixos/gpsd: add extraArgs option

Allows setting addtional arguments to gpsd

Changed files
+12
nixos
modules
services
misc
+12
nixos/modules/services/misc/gpsd.nix
···
'';
};
};
};
···
Type = "forking";
ExecStart = let
devices = utils.escapeSystemdExecArgs cfg.devices;
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"} \
${devices}
'';
};
···
'';
};
+
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.
+
'';
+
};
+
};
};
···
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}
'';
};