From e094566801271aed8a732022f2d91c2b985f03b2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 19 Nov 2024 10:40:51 +0100 Subject: [PATCH] feat(gui): add ROCm support via systemd tmpfiles rules Introduce ROCm support by symlinking ROCm packages in /opt/rocm. Also, comment out unused session variables. --- modules/nixos/services/gui/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/nixos/services/gui/default.nix b/modules/nixos/services/gui/default.nix index f5ce0df..5390a2a 100644 --- a/modules/nixos/services/gui/default.nix +++ b/modules/nixos/services/gui/default.nix @@ -81,8 +81,23 @@ in amdvlk ]; }; + + systemd.tmpfiles.rules = + let + rocmEnv = pkgs.symlinkJoin { + name = "rocm-combined"; + paths = with pkgs.rocmPackages; [ + rocblas + hipblas + clr + ]; + }; + in [ + "L+ /opt/rocm - - - - ${rocmEnv}" + ]; + environment.sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; + # LIBVA_DRIVER_NAME = "iHD"; # NIXOS_OZONE_WL = "1"; };