Merge pull request #146179 from Artturin/nixosgenerateconfig1

authored by

Artturi and committed by
GitHub
935c9a36 5bea0fab

+8
+8
nixos/modules/installer/tools/nixos-generate-config.pl
··· 91 91 } 92 92 93 93 94 + sub cpuManufacturer { 95 + my $id = shift; 96 + return $cpuinfo =~ /^vendor_id\s*:.* $id$/m; 97 + } 98 + 94 99 95 100 # Determine CPU governor to use 96 101 if (-e "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors") { ··· 110 115 # Virtualization support? 111 116 push @kernelModules, "kvm-intel" if hasCPUFeature "vmx"; 112 117 push @kernelModules, "kvm-amd" if hasCPUFeature "svm"; 118 + 119 + push @attrs, "hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;" if cpuManufacturer "AuthenticAMD"; 120 + push @attrs, "hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;" if cpuManufacturer "GenuineIntel"; 113 121 114 122 115 123 # Look at the PCI devices and add necessary modules. Note that most