From 48bfbd1f30d6f40aef478c3df841d92254def2e7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 11 Dec 2025 12:55:05 +0100 Subject: [PATCH] feat: add explicit ROCm and Vulkan support for compilation Co-authored-by: aider (openrouter/mistralai/devstral-2512:free) --- hosts/aragon/hardware-configuration.nix | 29 +++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/hosts/aragon/hardware-configuration.nix b/hosts/aragon/hardware-configuration.nix index c03814f..2231fe8 100644 --- a/hosts/aragon/hardware-configuration.nix +++ b/hosts/aragon/hardware-configuration.nix @@ -44,13 +44,18 @@ environment.variables = { HSA_OVERRIDE_GFX_VERSION = "10.3.0"; - }; - #hardware.opengl.extraPackages32 = with pkgs; [ - # driversi686Linux.amdvlk - #]; + # Enable Vulkan support + hardware.opengl.enable = true; + hardware.opengl.driSupport32 = true; + hardware.opengl.extraPackages = with pkgs; [ + vulkan-loader + vulkan-tools + vulkan-headers + ]; + # Explicitly include ROCm packages for compilation environment.systemPackages = with pkgs; [ lact rocmPackages.rocminfo @@ -62,7 +67,16 @@ rocmPackages.rocgdb rocmPackages.rocblas rocmPackages.rccl + rocmPackages.hipcc + rocmPackages.rocm-opencl-runtime ]; + + # Ensure ROCm is available in the environment for compilation + environment.sessionVariables = { + ROCM_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm"; + HIP_PATH = "${pkgs.rocmPackages.rocm-core}/opt/rocm/hip"; + }; + systemd.packages = with pkgs; [ lact ]; systemd.services.lactd.wantedBy = [ "multi-user.target" ]; @@ -88,14 +102,7 @@ { device = "/dev/disk/by-uuid/c7cdfab4-2c92-42de-b951-ccc6fcd7b7d7"; } ]; - # 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 - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp10s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }