From bce21018c8adc5197d3673790a325b767ea47471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 21 Oct 2023 22:25:22 +0200 Subject: [PATCH] nix fmt --- nixos/modules/suspend-on-low-power.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/suspend-on-low-power.nix b/nixos/modules/suspend-on-low-power.nix index 7d4700261..1fc6b3fa3 100644 --- a/nixos/modules/suspend-on-low-power.nix +++ b/nixos/modules/suspend-on-low-power.nix @@ -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" '';