Sorry for the maybe newb questions, I am new to nix.
I could not get any systemd related seetings to work. Maybe this is the syntax that changed, or maybe I just found old stuff.
- I want to suspend on Idle. For that I have currently:
services.logind.extraConfig = ''
IdleAction=suspend
IdleActionSec=60
'';
- I want to suspend/hibernate on low battery. I have tried:
2.a.
services.udev.extraRules = ''SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="${pkgs.systemd}/bin/systemctl suspend"'';
and 2.b.
services.upower = {
enable = true;
perentageCritical = 5;
criticalPowerAction = "Hibernate";
};
All of these have failed. Any advice?
I have tried Arch before, but I actually have never been able to use an udev rule, even copy-pasting things from the wiki. May that be related to my hardware and their firmware? I use an Acer Nitro 5 laptop.
Edit: I do not use a DE, I am on hyprland.