23 lines
1.1 KiB
Nix
23 lines
1.1 KiB
Nix
# gps-share: <https://github.com/zeenix/gps-share>
|
|
# takes a local GPS device (e.g. /dev/ttyUSB1) and makes it available over TCP/Avahi (multicast DNS).
|
|
#
|
|
# common usecases:
|
|
# 1. make positioning available to any device on a network, even if that device has no local GPS
|
|
# - e.g. my desktop can use my phone's GPS device, if on the same network.
|
|
# 2. allow multiple clients to share a GPS device.
|
|
# GPS devices are serial devices, and so only one process can consume the data at a time.
|
|
# gps-share can camp the serial device, and then allow *multiple* subscribers
|
|
# 3. provide a *read-only* API to clients like Geoclue.
|
|
# that is, expose the GPS device *output* to a client, but don't let the client write to the device (e.g. enable/disable the GPS).
|
|
# this is the primary function i derive from gps-share
|
|
{ ... }:
|
|
{
|
|
sane.programs.gps-share = {
|
|
services.gps-share = {
|
|
description = "gps-share: make local GPS serial readings available over Avahi";
|
|
command = "gps-share"; #< TODO: do i need to run it with any args?
|
|
dependencyOf = [ "geoclue-agent" ];
|
|
};
|
|
};
|
|
}
|