diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-12 10:03:04 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-12 10:03:04 +0200 |
| commit | c780b431976691202d6fb3bc3ad72b0185898c72 (patch) | |
| tree | e6acf8424ab8fc5b806c84a8d49d72efd9b006cf | |
| parent | aaaaf63840b968a99266e6b154c5064521358189 (diff) | |
| download | nixos-c780b431976691202d6fb3bc3ad72b0185898c72.tar.zst | |
Add amdgpu, remove nvidia
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | hosts/pihlaja/default.nix | 37 | ||||
| -rw-r--r-- | hosts/pihlaja/hardware-configuration.nix | 9 |
3 files changed, 9 insertions, 39 deletions
@@ -96,7 +96,7 @@ } { nixpkgs = { - config.cudaSupport = true; + config.rocmSupport = true; hostPlatform = "x86_64-linux"; }; } diff --git a/hosts/pihlaja/default.nix b/hosts/pihlaja/default.nix index 3e49f68..214091f 100644 --- a/hosts/pihlaja/default.nix +++ b/hosts/pihlaja/default.nix @@ -2,15 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ - inputs, - outputs, - lib, - config, - pkgs, - vars, - ... -}: +{ config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; @@ -19,21 +11,10 @@ bluetooth.enable = true; keyboard.qmk.enable = true; logitech.wireless.enable = true; - nvidia = { - modesetting.enable = true; - powerManagement = { - enable = true; - finegrained = false; - }; - open = true; - nvidiaSettings = false; - package = config.boot.kernelPackages.nvidiaPackages.latest; - }; - graphics = { - extraPackages = with pkgs; [ - nvidia-vaapi-driver - cudatoolkit - ]; + amdgpu = { + opencl.enable = true; + initrd.enable = true; + overdrive.enable = true; }; bluetooth.settings.General.Name = "pihlaja"; @@ -46,11 +27,7 @@ environment = { sessionVariables = { - LIBVA_DRIVER_NAME = "nvidia"; - VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json"; - GBM_BACKEND = "nvidia-drm"; - __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - NVD_BACKEND = "direct"; + AMD_USERQ = 1; # bypass kernel }; systemPackages = with pkgs; [ logiops @@ -152,7 +129,7 @@ }; }; xserver = { - videoDrivers = [ "nvidia" ]; + videoDrivers = [ "amdgpu" ]; }; udev.packages = with pkgs; [ qmk diff --git a/hosts/pihlaja/hardware-configuration.nix b/hosts/pihlaja/hardware-configuration.nix index 95fdfb4..53db431 100644 --- a/hosts/pihlaja/hardware-configuration.nix +++ b/hosts/pihlaja/hardware-configuration.nix @@ -15,25 +15,19 @@ boot = { kernelPackages = pkgs.linuxPackages; kernelParams = [ - "NVreg_PreserveVideoMemoryAllocations=1" "mitigations=off" "nospectre_v2" - "nvidia_drm.fbdev=1" - "nvidia_drm.modeset=1" "transparent_hugepage=always" ]; initrd = { luks.devices."luks-a47a6087-e6bf-4e8d-a034-2229259c38f5".device = "/dev/disk/by-uuid/a47a6087-e6bf-4e8d-a034-2229259c38f5"; availableKernelModules = [ + "amdgpu" "ahci" "cdc_acm" "iwldvm" "iwlwifi" - "nvidia" - "nvidia_drm" - "nvidia_modeset" - "nvidia_uvm" "nvme" "sd_mod" "usb_storage" @@ -44,7 +38,6 @@ "/dev/disk/by-uuid/1efa1182-2964-49bf-a413-fb51bd7b107f"; }; kernelModules = [ - "amdgpu" "iwldvm" "iwlwifi" "k10temp" |
