Skip to content

Nix flake providing AMD microcode updates for unsupported CPUs

License

Notifications You must be signed in to change notification settings

colemickens/ucodenix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ucodenix

About

ucodenix is a Nix flake providing AMD microcode updates for unsupported CPUs.

Note

Microcodes are fetched from this repository, which aggregates them from official sources provided and made public by various manufacturers.

Features

  • Fetches the microcode binary based on your processor's model ID.
  • Generates the microcode container as used by the Linux kernel.
  • Integrates the generated microcode into the NixOS configuration.

Installation

Add the flake as an input:

inputs.ucodenix.url = "github:e-tho/ucodenix";

Usage

Install cpuid and run the following command to retrieve your processor's model ID:

cpuid -1 -l 1 -r | sed -n 's/.*eax=0x\([0-9a-f]*\).*/\U\1/p'

Enable the ucodenix NixOS module and set the model ID in your configuration:

{ inputs, ... }:
{
  imports = [ inputs.ucodenix.nixosModules.default ];

  services.ucodenix = {
    enable = true;
    cpuModelId = "00A20F12"; # Replace with your processor's model ID
  };
}

Setting cpuModelId to "auto" enables automatic detection of the CPU model ID at build time. Note that this makes the build non-reproducible, so specifying cpuModelId manually is recommended.

FAQ

Why would I need this if AMD provides microcodes to linux-firmware?

AMD only supplies microcodes to linux-firmware for certain server-grade CPUs. For consumer CPUs, updates are distributed through BIOS releases by motherboard and laptop manufacturers, which can be inconsistent, delayed, or even discontinued over time. This flake ensures you have the latest microcodes directly on NixOS, without depending on BIOS updates.

Is there any risk in using this flake?

The microcodes are obtained from official sources and are checked for integrity and size. The Linux kernel has built-in safeguards and will only load microcode that is compatible with your CPU, otherwise defaulting to the BIOS-provided version.

Disclaimer

This software is provided "as is" without any guarantees.

License

GPLv3

About

Nix flake providing AMD microcode updates for unsupported CPUs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 100.0%