mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Treewide] Rename cpuXxxx references to cpu.xxxx references
This commit is contained in:
parent
c4a7421ec6
commit
bc8978484f
7 changed files with 17 additions and 17 deletions
|
|
@ -2,19 +2,19 @@
|
|||
with lib;
|
||||
let
|
||||
generalCfg = config.aviallon.general;
|
||||
cpuIsZen = ! isNull (builtins.match "znver[0-9]" generalCfg.cpuArch);
|
||||
cpuIsZen = ! isNull (builtins.match "znver[0-9]" generalCfg.cpu.arch);
|
||||
in {
|
||||
config = mkIf (generalCfg.cpuVendor == "amd") {
|
||||
config = mkIf (generalCfg.cpu.vendor == "amd") {
|
||||
boot.kernel.sysctl = {
|
||||
|
||||
# Why: https://www.phoronix.com/news/Ryzen-Segv-Response
|
||||
# Workaround: https://forums.gentoo.org/viewtopic-p-2605135.html#2605135
|
||||
"kernel.randomize_va_space" = mkIf (generalCfg.cpuArch == "znver1" ) (warn "Disable Adress Space Layout Randomization on Ryzen 1 CPU" 0);
|
||||
"kernel.randomize_va_space" = mkIf (generalCfg.cpu.arch == "znver1" ) (warn "Disable Adress Space Layout Randomization on Ryzen 1 CPU" 0);
|
||||
};
|
||||
|
||||
aviallon.boot.cmdline = {
|
||||
"amd_pstate" = "passive";
|
||||
} // optionalAttrs (generalCfg.cpuArch == "znver2") {
|
||||
} // optionalAttrs (generalCfg.cpu.arch == "znver2") {
|
||||
# Required for Zen 2
|
||||
"amd_pstate.shared_memory" = 1;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ let
|
|||
generalCfg = config.aviallon.general;
|
||||
throttledService = "lenovo_fix";
|
||||
in {
|
||||
config = mkIf (generalCfg.cpuVendor == "intel") {
|
||||
config = mkIf (generalCfg.cpu.vendor == "intel") {
|
||||
aviallon.boot.cmdline = {
|
||||
"intel_pstate" = "passive";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue