tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
748 stars 74 forks source link

Add asahi-battery-threshold #93

Closed Enzime closed 10 months ago

Enzime commented 10 months ago

asahi-battery-threshold is small daemon that makes it possible to set a charging threshold for laptops running Asahi Linux.

https://github.com/PaddiM8/asahi-battery-threshold

Enzime commented 10 months ago

Closing as this is natively supported by Asahi Linux https://twitter.com/AsahiLinux/status/1638954458821578752

Lucus16 commented 10 months ago

That tweet mentions it doesn't persist across reboots yet. And besides, I'd rather configure it in a NixOS module, so I'd appreciate it if this PR is reopened. I do think it's preferable to use udev rules over spawning a dedicated systemd service.

Enzime commented 10 months ago

An example udev rule to make it persist across reboots is here:

https://github.com/Enzime/dotfiles-nix/blob/%F0%9F%94%A5/hosts/hermes/configuration.nix#L14-L16

Feel free to create another PR if you'd like