moby: enable geoclue service

This commit is contained in:
Colin 2023-08-22 07:15:14 +00:00
parent 0cc518e523
commit d6b262a28e

View File

@ -15,10 +15,24 @@
#
# geoclue somehow fits in here as a geospatial provider that leverages GPS and also other sources like radio towers
{ ... }:
{ lib, ... }:
{
# test gpsd with `gpspipe -w -n 10 2> /dev/null | grep -m 1 TPV | jq '.lat, .lon' | tr '\n' ' '`
# ^ should return <lat> <long>
services.gpsd.enable = true;
services.gpsd.devices = [ "/dev/ttyUSB1" ];
# test geoclue2 by building `geoclue2-with-demo-agent`
# and running "${geoclue2-with-demo-agent}/libexec/geoclue-2/demos/where-am-i"
services.geoclue2.enable = true;
services.geoclue2.appConfig.where-am-i = {
# this is the default "agent", shipped by geoclue package: allow it to use location
isAllowed = true;
isSystem = false;
# users = [ "colin" ]; #< restrict to only one set of users, else allows all.
};
systemd.services.geoclue.after = lib.mkForce []; #< defaults to network-online, but not all my sources require network
sane.services.eg25-control.enable = true;
}