nix-community / plasma-manager

Manage KDE Plasma with Home Manager
https://nix-community.github.io/plasma-manager/
MIT License
602 stars 70 forks source link

bug: powerdevil: some power actions will not apply to the configuration file #367

Closed ccicnce113424 closed 1 week ago

ccicnce113424 commented 1 week ago

https://github.com/nix-community/plasma-manager/blob/7fb80fea2373c3cc9f05a84204ad0b3233464b17/modules/powerdevil.nix#L11 https://github.com/nix-community/plasma-manager/blob/7fb80fea2373c3cc9f05a84204ad0b3233464b17/modules/powerdevil.nix#L18 https://github.com/nix-community/plasma-manager/blob/7fb80fea2373c3cc9f05a84204ad0b3233464b17/modules/powerdevil.nix#L23 https://github.com/nix-community/plasma-manager/blob/7fb80fea2373c3cc9f05a84204ad0b3233464b17/modules/powerdevil.nix#L30 Setting values to null will not modify the configuration file at all, only the current settings will be retained.

magnouvean commented 1 week ago

This would only be a problem when overrideConfig is disabled I believe, due to these values being the defaults, but it should be fixed anyhow in the cases where we aren't using overrideConfig. Exactly what the best solution is here though I am not sure since I believe the reason it was set to null in the first place was due to the configuration key/value needing to be omitted from the appropriate config-file altogether, which we a.t.m. don't have a mechanism for in plasma-manager (when overrideConfig is disabled at the very least). We could test to see if setting the value to "" would give the appropriate results though.