2023-03-09 09:28:11 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
# assumes common-gpu-amd from nixos-hardware is also added
|
2023-03-19 04:23:38 +01:00
|
|
|
# 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/
|
|
|
|
|
2023-06-19 02:45:50 +02:00
|
|
|
nixpkgs.config.rocmSupport = true;
|
|
|
|
|
2023-06-18 23:36:17 +02:00
|
|
|
hardware.opengl.enable = true;
|
2023-03-19 04:23:38 +01:00
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ]; # use gpu, adaptive sync and and hardware page flipping
|
|
|
|
#services.xserver.videoDrivers = [ "modesetting" ]; # integrated (non-accelerated) framebuffer, KMS
|
|
|
|
|
2023-03-09 09:28:11 +01:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
|
|
|
|
];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
nvtop
|
|
|
|
];
|
|
|
|
}
|