diff --git a/flake.lock b/flake.lock index 415eb54..f6146b1 100644 --- a/flake.lock +++ b/flake.lock @@ -74,6 +74,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1730537918, + "narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "f6e0cd5c47d150c4718199084e5764f968f1b560", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1730200266, @@ -94,6 +110,7 @@ "inputs": { "mysecrets": "mysecrets", "nix-vscode-extensions": "nix-vscode-extensions", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index 96a8300..4e83ff5 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,8 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + # Secrets management sops-nix = { url = "github:Mic92/sops-nix"; diff --git a/hosts/gwiad/hardware-configuration.nix b/hosts/gwiad/hardware-configuration.nix index 0578af1..880c487 100644 --- a/hosts/gwiad/hardware-configuration.nix +++ b/hosts/gwiad/hardware-configuration.nix @@ -1,13 +1,17 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, pkgs, inputs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen3 ]; + services.fwupd.enable = true; + hardware.enableRedistributableFirmware = true; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; @@ -56,5 +60,4 @@ # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }