gps-share: specify /dev path to GPS device
This commit is contained in:
parent
d8ca5f91c3
commit
90f8d1e042
|
@ -10,12 +10,29 @@
|
|||
# 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
|
||||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.gps-share;
|
||||
in
|
||||
{
|
||||
sane.programs.gps-share = {
|
||||
services.gps-share = {
|
||||
configOption = with lib; mkOption {
|
||||
default = {};
|
||||
type = types.submodule {
|
||||
options.device = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
path to GPS device to share.
|
||||
'';
|
||||
example = "/dev/ttyUSB1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gps-share = lib.mkIf (cfg.config.device != null) {
|
||||
description = "gps-share: make local GPS serial readings available over Avahi";
|
||||
command = "gps-share"; #< TODO: do i need to run it with any args?
|
||||
command = "gps-share ${cfg.config.device}";
|
||||
dependencyOf = [ "geoclue-agent" ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -283,6 +283,9 @@ in
|
|||
dd if=${pkgs.tow-boot-pinephone}/Tow-Boot.noenv.bin of=$out bs=1024 seek=8 conv=notrunc
|
||||
'';
|
||||
|
||||
sane.programs.gps-share.config = {
|
||||
device = "/dev/ttyUSB1";
|
||||
};
|
||||
sane.programs.swaynotificationcenter.config = {
|
||||
backlight = "backlight"; # /sys/class/backlight/*backlight*/brightness
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user