Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: fail evaluation if power-profiles-daemon is enabled #809

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

shadeyg56
Copy link
Collaborator

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 alongside power-profiles. This forces the user to disable power-profiles, in order for their config to build. I considered just making this a warning, since technically you can still run auto-cpufreq manually, but I feel like it is better to force users to enable one or the other in this case

Fixes systemd service being killed on boot
@shadeyg56 shadeyg56 requested a review from AdnanHodzic February 9, 2025 04:01
@AdnanHodzic
Copy link
Owner

LGTM, wouldn't be bad to have this same assertions block outside of Nix scope.

@AdnanHodzic AdnanHodzic merged commit e6bbd2c into master Feb 9, 2025
4 checks passed
@shadeyg56 shadeyg56 deleted the nix-systemd-fix branch February 9, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants