diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-10-30 17:47:45 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-10-30 17:47:45 +0100 |
commit | b0f5f2ab70c047f1855ce45743dc678ccdb3bae9 (patch) | |
tree | febef4c9e39cdc89a85fe15da09b450d21cd7ee7 | |
parent | f9758bd8c7a2be7b6a03cf538de002369612743f (diff) | |
download | nixos-b0f5f2ab70c047f1855ce45743dc678ccdb3bae9.tar nixos-b0f5f2ab70c047f1855ce45743dc678ccdb3bae9.tar.gz nixos-b0f5f2ab70c047f1855ce45743dc678ccdb3bae9.tar.bz2 nixos-b0f5f2ab70c047f1855ce45743dc678ccdb3bae9.tar.xz nixos-b0f5f2ab70c047f1855ce45743dc678ccdb3bae9.zip |
Configure gps
-rw-r--r-- | hel.nix | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -470,8 +470,6 @@ | |||
470 | [ systemd coreutils ]; | 470 | [ systemd coreutils ]; |
471 | 471 | ||
472 | script = '' | 472 | script = '' |
473 | #!{pkgs.stdenv.shell} | ||
474 | |||
475 | exec systemd-inhibit --what=handle-lid-switch:sleep --why="AC is connected" --mode=block sleep infinity | 473 | exec systemd-inhibit --what=handle-lid-switch:sleep --why="AC is connected" --mode=block sleep infinity |
476 | ''; | 474 | ''; |
477 | 475 | ||
@@ -485,6 +483,20 @@ | |||
485 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" | 483 | SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${systemd}/bin/systemctl --no-block start ac-plugged.service" |
486 | 484 | ||
487 | KERNELS=="1-2:1.2", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="gps0" | 485 | KERNELS=="1-2:1.2", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="gps0" |
486 | KERNELS=="1-2:1.3", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="gpsctl0" | ||
488 | ''; | 487 | ''; |
488 | |||
489 | systemd.services."gpscfg" = { | ||
490 | description = "Configure GPS"; | ||
491 | |||
492 | script = '' | ||
493 | printf 'AT!GPSTRACK=1,255,30,1000,1\r' > /dev/gpsctl0 | ||
494 | ''; | ||
495 | }; | ||
496 | |||
497 | systemd.timers."gpscfg".timerConfig = { | ||
498 | OnActiveSec = "30s"; | ||
499 | OnUnitActiveSec = "30s"; | ||
500 | }; | ||
489 | } | 501 | } |
490 | 502 | ||