From 09a816f5cbb8adbd0b6ae55cc9217af288ae14f8 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Tue, 12 Nov 2024 09:14:37 -0600 Subject: [PATCH] amd microcode patch --- flake.lock | 37 +++++++++++++++++++- flake.nix | 1 + hosts/workstation/hardware-configuration.nix | 13 ++++--- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 5f054e8..e0c0bc2 100644 --- a/flake.lock +++ b/flake.lock @@ -454,6 +454,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1727348695, "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", @@ -502,6 +518,7 @@ "nixpkgs": "nixpkgs_3", "nixpkgsC": "nixpkgsC", "sops-nix": "sops-nix", + "ucodenix": "ucodenix", "zen-browser": "zen-browser" } }, @@ -562,6 +579,24 @@ "type": "github" } }, + "ucodenix": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1731370323, + "narHash": "sha256-o2+w8Eda2vUN5TtFiheUXReTxd1YNlAg1g1kVKXI1cI=", + "owner": "e-tho", + "repo": "ucodenix", + "rev": "718ff785d5c12cb2ec136b13d423b2e808ffeddc", + "type": "github" + }, + "original": { + "owner": "e-tho", + "repo": "ucodenix", + "type": "github" + } + }, "umu": { "inputs": { "nixpkgs": [ @@ -630,7 +665,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1727721329, diff --git a/flake.nix b/flake.nix index 9d2e39c..7ca2fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + ucodenix.url = "github:e-tho/ucodenix"; nix-gaming.url = "github:fufexan/nix-gaming"; hyprland.url = "github:hyprwm/Hyprland"; sops-nix = { diff --git a/hosts/workstation/hardware-configuration.nix b/hosts/workstation/hardware-configuration.nix index ff82cc6..fd5c325 100644 --- a/hosts/workstation/hardware-configuration.nix +++ b/hosts/workstation/hardware-configuration.nix @@ -1,14 +1,19 @@ { - config, modulesPath, - lib, pkgs, + inputs, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + inputs.ucodenix.nixosModules.default + ]; + services.ucodenix = { + enable = true; + cpuModelId = "00A50F00"; + }; hardware = { - cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; bluetooth = { enable = true; settings.General = {