diff --git a/hosts/mandarin/default.nix b/hosts/mandarin/default.nix index 0ecf54a6..f6a6b99f 100644 --- a/hosts/mandarin/default.nix +++ b/hosts/mandarin/default.nix @@ -27,7 +27,7 @@ base = { enable = true; plymouth.enable = true; - zramSwap = {enable = true;}; + zramSwap.enable = true; }; users = { aly = { @@ -63,7 +63,7 @@ flatpak.enable = true; ollama = { enable = true; - gpu = "nvidia"; + gpu = "rocm"; }; tailscale.enable = true; }; diff --git a/hosts/mandarin/hardware.nix b/hosts/mandarin/hardware.nix index 76996589..a9d55c83 100644 --- a/hosts/mandarin/hardware.nix +++ b/hosts/mandarin/hardware.nix @@ -11,6 +11,8 @@ }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + inputs.nixos-hardware.nixosModules.common-cpu-amd + inputs.nixos-hardware.nixosModules.common-pc-ssd ]; boot = { @@ -22,9 +24,9 @@ "usbhid" "xhci_pci" ]; - kernelModules = []; + kernelModules = ["amdgpu"]; }; - kernelModules = ["kvm-amd"]; + kernelModules = ["kvm-amd" "amdgpu"]; }; hardware = { @@ -33,19 +35,16 @@ enableAllFirmware = true; - nvidia = { - modesetting.enable = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - opengl = { driSupport = true; driSupport32Bit = true; + + extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk]; + extraPackages32 = with pkgs; [driversi686Linux.amdvlk]; }; }; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = ["amdgpu"]; networking.useDHCP = lib.mkDefault true; diff --git a/hosts/mauville/hardware.nix b/hosts/mauville/hardware.nix index 87b92e41..0cea1b2f 100644 --- a/hosts/mauville/hardware.nix +++ b/hosts/mauville/hardware.nix @@ -15,16 +15,12 @@ boot = { initrd = { availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; - kernelModules = []; + kernelModules = ["amdgpu"]; }; kernelModules = ["kvm-amd" "amdgpu"]; }; - services.xserver = { - videoDrivers = ["amdgpu"]; # Add AMDGPU driver. - }; - hardware = { cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; @@ -70,6 +66,10 @@ } ]; + services.xserver = { + videoDrivers = ["amdgpu"]; # Add AMDGPU driver. + }; + networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";