From 1105bc8fedaa32b641a4ac605bcc37b652191595 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:18:20 -0700 Subject: [PATCH] add microcode service for amd --- flake.lock | 35 +++++++++++++++++++++++++++++++++++ flake.nix | 3 +++ hosts/tempest/default.nix | 2 ++ 3 files changed, 40 insertions(+) diff --git a/flake.lock b/flake.lock index 368a44b..45cef86 100644 --- a/flake.lock +++ b/flake.lock @@ -477,6 +477,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1731119600, @@ -632,6 +648,7 @@ "tree-sitter-python": "tree-sitter-python", "tree-sitter-rasi": "tree-sitter-rasi", "tree-sitter-vimdoc": "tree-sitter-vimdoc", + "ucodenix": "ucodenix", "wallpapers": "wallpapers", "wsl": "wsl", "zenyd-mpv-scripts": "zenyd-mpv-scripts" @@ -879,6 +896,24 @@ "type": "github" } }, + "ucodenix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1731337052, + "narHash": "sha256-/wKkjAHHmaov6VWW7POdL+dUWtAWA9Zs6Ys/r7ugy00=", + "owner": "e-tho", + "repo": "ucodenix", + "rev": "5d8df57d4258d225dc9f5c2c4bb96855842cbac2", + "type": "github" + }, + "original": { + "owner": "e-tho", + "repo": "ucodenix", + "type": "github" + } + }, "wallpapers": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 39fbb55..5d6f2ec 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,9 @@ inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list for their inputs }; + # Used for AMD CPU microcode + ucodenix.url = "github:e-tho/ucodenix"; + # Community packages; used for Firefox extensions nur.url = "github:nix-community/nur"; diff --git a/hosts/tempest/default.nix b/hosts/tempest/default.nix index 9751d29..1f2f4b3 100644 --- a/hosts/tempest/default.nix +++ b/hosts/tempest/default.nix @@ -17,6 +17,7 @@ inputs.nixpkgs.lib.nixosSystem rec { modules = [ globals inputs.home-manager.nixosModules.home-manager + inputs.ucodenix.nixosModules.default ../../modules/common ../../modules/nixos { @@ -49,6 +50,7 @@ inputs.nixpkgs.lib.nixosSystem rec { # Allow firmware updates hardware.cpu.amd.updateMicrocode = true; + services.ucodenix.enable = true; # Helps reduce GPU fan noise under idle loads hardware.fancontrol.enable = true;