bwa
This commit is contained in:
13
config/modules/power-management/battery-ac-targets.nix
Normal file
13
config/modules/power-management/battery-ac-targets.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
modules.battery-ac-targets = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/run/current-system/systemd/bin/systemctl start battery.target"
|
||||
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/run/current-system/systemd/bin/systemctl start ac.target"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user