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
backport cpufreq opts to 18.09 #53187
backport cpufreq opts to 18.09 #53187
Conversation
nixos/modules/tasks/cpu-freq.nix
Outdated
|
||
powerManagement.cpuFreqGovernor = mkOption { | ||
governor = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should break the configuration within a release also it has an alias without a good reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding new options should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 The alias allow users on 18.09 to upgrade to the new module name (powerManagement.cpufreq.governor
) which will be used in 19.03 by default.
I don't think there is a good reason not to add this alias. I don't think adding an alias will break anyone's configuration?
Well, unless someone is already using the powerManagment.cpufreq.governor
module name in one of their private configs? Maybe we want to be extra careful and make sure not to break this?
Although thinking about this, this should be similar to adding adding new configuration options (like powerManagement.cpufreq.max
and powerManagement.cpufreq.min
). I guess there isn't a huge difference between adding an alias and adding a new configuration option.
So I guess I am for adding the powerManagement.cpufreq.governor
alias so that people can update their configurations while still using 18.09 in preparation for 19.03.
|
5fa2cd6
to
6c0776c
Compare
6c0776c
to
0232f5c
Compare
I've updated this PR to not change the existing All this current PR does is add two additional options:
@Mic92 This should fix your concerns with changing the current @infinisil This should be ready for review. This is simply a backport of #53301 to 18.09. |
This backports #53041 to 18.09.
Here's the explanation from #53041:
This adds a NixOS option for setting the CPU max and min frequencies with
cpufreq
. The two options that have been added are:powerManagement.cpufreq.max
powerManagement.cpufreq.min
It also adds an alias to the
powerManagement.cpuFreqGovernor
option aspowerManagement.cpufreq.governor
.(cherry picked from commit b0f10d2)
Motivation for this change
It is nice to be able to set the cpu min and max frequencies with nixos options.
Ping @infinisil since he helped me with #53041.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)