Skip to content

Commit

Permalink
nix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Oct 21, 2023
1 parent a472a29 commit bce2101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/suspend-on-low-power.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ config, ... }:
let
powerInPercent = 10;
in {
in
{
services.udev.extraRules = ''
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="${toString powerInPercent}", RUN+="${config.systemd.package}/bin/systemctl suspend"
'';
Expand Down

0 comments on commit bce2101

Please sign in to comment.