Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 2.08 KB

README.md

File metadata and controls

66 lines (42 loc) · 2.08 KB

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