NixOS Battery widget no percentage/power profile error.
For the dank shell on niri with the dms home module there is no battery percent display and changing power profiles yields the attached screenshot.
Compositor
- [x] niri
- [ ] Hyprland
- [ ] Other (specify)
Description
Expected Behavior
Steps to Reproduce
1.Nixos Unstable 2.Use home module with niri integration 3.setup battery widget
Screenshots/Recordings
relevant nix configuration where i setup dank-shell https://github.com/argosnothing/nixos-config/blob/18d50ad2b601580c64f158971e372a1d79e130a2/modules/gui/desktop-shells/dank-shell.nix#L10
I relabeled because it's not a bug, but a configuration thing. I'm not saying it's your fault because nixOS is a black box to me and I don't understand what's going on over there.
I would guess that, a dbus interface is inaccessible or not available (upower) or potentially your user doesn't have permission to access it. Either case I'm not familiar enough with nix to suggest the proper way to fix it
add this
services.upower.enable = true;
services.power-profiles-daemon.enable = true;
Will do, thanks mate
add this
services.upower.enable = true; services.power-profiles-daemon.enable = true;
Same Issue I am facing in arch How can I fix it
add this
services.upower.enable = true; services.power-profiles-daemon.enable = true;
I just encountered this myself (battery percentage warn't showing), I think this could be mentioned in the NixOS installation docs.