diff --git a/flake.nix b/flake.nix index 86c0440..54108ab 100644 --- a/flake.nix +++ b/flake.nix @@ -198,7 +198,7 @@ #hostname "domain" "system" inputs "state" [ modules ... ] noximilien = mk "pbsds.net" "x86_64-linux" inputs-2311 "22.11" [ intel ]; brumlebasse = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ amd ]; - nord = mk "pbsds.net" "x86_64-linux" inputs-2305 "23.05" [ intel-novga hw.common-cpu-intel-sandy-bridge rocm hidpi ]; + nord = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.05" [ intel-novga hw.common-cpu-intel-sandy-bridge rocm hidpi ]; sopp = mk "pbsds.net" "x86_64-linux" inputs-2305 "23.05" [ intel cuda p1005 ]; bolle = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel ]; eple = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel ]; diff --git a/hardware/gpu/rocm.nix b/hardware/gpu/rocm.nix index c319c20..f050997 100644 --- a/hardware/gpu/rocm.nix +++ b/hardware/gpu/rocm.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { # assumes common-gpu-amd from nixos-hardware is also added # TODO: should we move it from flake.nix to here? @@ -16,7 +16,10 @@ hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = [ pkgs.rocm-opencl-icd - pkgs.rocm-runtime#-ext + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") + then pkgs.rocm-runtime#-ext + else pkgs.rocmPackages.rocm-runtime + ) ]; nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ? @@ -25,8 +28,12 @@ nixpkgs.config.vaapiSupport = true; # https://nixos.wiki/wiki/AMD_GPU#HIP - systemd.tmpfiles.rules = [ - "L+ /opt/rocm/hip - - - - ${pkgs.hip}" + systemd.tmpfiles.rules = let + hip = if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") + then pkgs.hip + else pkgs.rocmPackages.clr; + in [ + "L+ /opt/rocm/hip - - - - ${hip}" ]; environment.systemPackages = with pkgs; [