nix: fail evaluation if power-profiles-daemon is enabled #809
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So I noticed auto-cpufreq systemd service was being killed immediately after boot on Nix.
This was actually brought up previously in #740, but it seemed to fix itself for everyone.
Anyways, it started happening to me recently and was happening on every single boot so I knew something was wrong.
Basically I discovered that if a module enabled (or the user has it explicitly enabled)
services.power-profiles-daemon
, systemd sees it as a conflict and just decides to kill auto-cpufreq in favor of power-profiles. In my situation, Cinnamon DE was enabling it by default.This PR makes a change that causes an assertion error to be thrown if the user has
auto-cpufreq
enabled alongsidepower-profiles
. This forces the user to disablepower-profiles
, in order for their config to build. I considered just making this a warning, since technically you can still runauto-cpufreq
manually, but I feel like it is better to force users to enable one or the other in this case