diff options
-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 | ||