This commit is contained in:
2023-06-23 21:45:16 +02:00
parent 1e9560dc04
commit 54ba2cfd56
16 changed files with 41 additions and 47 deletions

View File

@@ -6,6 +6,7 @@
# https://nixos.wiki/wiki/Nvidia
#nixpkgs.config.cudaSupport = true; # TODO: TOO SLOW, BREAKS
#nixpkgs.config.nvidiaSupport = true; # TODO: used only by zenith
nixpkgs.config.allowUnfreePredicate = pkg: lib.any (x: x) [
(lib.hasInfix "nvidia" (lib.toLower (lib.getName pkg)))
(lib.hasInfix "cuda" (lib.toLower (lib.getName pkg)))
@@ -27,7 +28,7 @@
#};
environment.systemPackages = with pkgs; ([
nvtop
nvtop-nvidia
] ++ lib.optional config.hardware.nvidia.prime.offload.enable [
(writeShellScriptBin "prime-run" ''

View File

@@ -3,11 +3,16 @@
# assumes common-gpu-amd from nixos-hardware is also added
# TODO: should we move it from flake.nix to here?
# https://libreddit.noximilien.pbsds.net/r/archlinux/comments/nih9c9/amdgpu_vs_modesetting_in_current_510_kernels_xorg/
# nixos-hardware common-amd option
hardware.amdgpu.opencl = true;
nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ?
nixpkgs.config.rocmSupport = true;
hardware.opengl.enable = true;
# https://libreddit.noximilien.pbsds.net/r/archlinux/comments/nih9c9/amdgpu_vs_modesetting_in_current_510_kernels_xorg/
services.xserver.videoDrivers = [ "amdgpu" ]; # use gpu, adaptive sync and and hardware page flipping
#services.xserver.videoDrivers = [ "modesetting" ]; # integrated (non-accelerated) framebuffer, KMS
@@ -15,6 +20,6 @@
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
];
environment.systemPackages = with pkgs; [
nvtop
nvtop-amd
];
}