From 1fde84a001413ac9d8f2857ae7bf9d803257ecff Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 6 Apr 2024 20:15:58 -0400 Subject: [PATCH] Integrate nixos-hardware more --- flake.lock | 12 ++++++------ flake.nix | 6 ++++++ hosts/Haven/hardware-configuration.nix | 1 - hosts/Shura/hardware-configuration.nix | 17 +---------------- 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/flake.lock b/flake.lock index 0b0d61f..98bc5a2 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ ] }, "locked": { - "lastModified": 1712212014, - "narHash": "sha256-s+lbaf3nLRn1++/X2eXwY9mYCA/m9l8AvyG8beeOaXE=", + "lastModified": 1712390667, + "narHash": "sha256-ebq+fJZfobqpsAdGDGpxNWSySbQejRwW9cdiil6krCo=", "owner": "nix-community", "repo": "home-manager", - "rev": "7e91f2a0ba4b62b88591279d54f741a13e36245b", + "rev": "b787726a8413e11b074cde42704b4af32d95545c", "type": "github" }, "original": { @@ -174,11 +174,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1711352745, - "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "lastModified": 1712324865, + "narHash": "sha256-+BatEWd4HlMeK7Ora+gYIkarjxFVCg9oKrIeybHIIX4=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "rev": "f3b959627bca46a9f7052b8fbc464b8323e68c2c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index acc8085..21df04c 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,7 @@ Dimaga = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = defaultModules.base ++ [ + nixos-hardware.nixosModules.common-cpu-intel ./hosts/Dimaga ]; }; @@ -68,6 +69,8 @@ Haven = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = defaultModules.base ++ [ + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate ./hosts/Haven ]; }; @@ -83,6 +86,9 @@ Shura = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = defaultModules.base ++ [ + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate + nixos-hardware.nixosModules.common-gpu-amd ./hosts/Shura ]; }; diff --git a/hosts/Haven/hardware-configuration.nix b/hosts/Haven/hardware-configuration.nix index 91ed5fa..a380b19 100644 --- a/hosts/Haven/hardware-configuration.nix +++ b/hosts/Haven/hardware-configuration.nix @@ -49,5 +49,4 @@ }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/Shura/hardware-configuration.nix b/hosts/Shura/hardware-configuration.nix index 1704902..154c14d 100644 --- a/hosts/Shura/hardware-configuration.nix +++ b/hosts/Shura/hardware-configuration.nix @@ -32,9 +32,7 @@ in }; }; - kernelModules = [ - "kvm-amd" - ]; + kernelModules = [ "kvm-amd" ]; # Add kernel patch to enable sound over the speakers. # Patch sourced from https://github.com/christian-bendiksen/kernel-6.8.0-63.16ARHA7.fc40 @@ -65,18 +63,6 @@ in size = 16384; }]; - # Enable AMDGPU - hardware = { - opengl = { - driSupport = true; # This is already enabled by default, but just in case. - driSupport32Bit = true; # For 32 bit applications. - - extraPackages = with pkgs; [ - rocmPackages.clr.icd # OpenCL - ]; - }; - }; - networking = { # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -92,5 +78,4 @@ in # TODO: Add fingerprint detection, but see this change first: https://bugs.launchpad.net/oem-priority/+bug/2024149 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }