From b0f5f2ab70c047f1855ce45743dc678ccdb3bae9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 30 Oct 2017 17:47:45 +0100 Subject: Configure gps --- hel.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'hel.nix') diff --git a/hel.nix b/hel.nix index 9458abf1..5e3d2819 100644 --- a/hel.nix +++ b/hel.nix @@ -470,8 +470,6 @@ [ systemd coreutils ]; script = '' - #!{pkgs.stdenv.shell} - exec systemd-inhibit --what=handle-lid-switch:sleep --why="AC is connected" --mode=block sleep infinity ''; @@ -485,6 +483,20 @@ SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" KERNELS=="1-2:1.2", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="gps0" + KERNELS=="1-2:1.3", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="gpsctl0" ''; + + systemd.services."gpscfg" = { + description = "Configure GPS"; + + script = '' + printf 'AT!GPSTRACK=1,255,30,1000,1\r' > /dev/gpsctl0 + ''; + }; + + systemd.timers."gpscfg".timerConfig = { + OnActiveSec = "30s"; + OnUnitActiveSec = "30s"; + }; } -- cgit v1.2.3