From b803a816db09bd473cd0e14e66cb49235eeb960f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Sat, 28 Dec 2024 20:06:27 +0100 Subject: [PATCH] remove rocm --- flake.nix | 9 +++++++-- modules/nixos/gpu/amd.nix | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 5e3397b..558a609 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,13 @@ pkgs = import nixpkgs { inherit system; config = { - allowUnfree = true; - rocmSupport = true; + allowUnfreePredicate = pkg: + builtins.elem (nixpkgs.lib.getName pkg) [ + "discord" + "samsung-UnifiedLinuxDriver" + "steam" + "steam-unwrapped" + ]; }; }; in { diff --git a/modules/nixos/gpu/amd.nix b/modules/nixos/gpu/amd.nix index f1e25da..277f14e 100644 --- a/modules/nixos/gpu/amd.nix +++ b/modules/nixos/gpu/amd.nix @@ -14,8 +14,18 @@ in { boot.initrd.kernelModules = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"]; - systemd.tmpfiles.rules = [ - "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + systemd.tmpfiles.rules = let + rocmEnv = pkgs.symlinkJoin { + name = "rocm-combined"; + paths = with pkgs.rocmPackages; [ + rocblas + hipblas + rocm-smi + clr + ]; + }; + in [ + "L+ /opt/rocm - - - - ${rocmEnv}" ]; hardware.graphics = { @@ -23,7 +33,6 @@ in { enable32Bit = true; extraPackages = with pkgs; [ rocmPackages.clr.icd - rocmPackages.rocm-smi amdvlk ]; extraPackages32 = with pkgs; [