1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00

nixos/nvidia: fix eval with virtualisation.docker.enableNvidia enabled

This commit is contained in:
Sandro Jäckel 2024-06-11 01:03:10 +02:00
parent d2943a89bb
commit 319c97cfcb
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -288,7 +288,7 @@ in
softdep nvidia post: nvidia-uvm softdep nvidia post: nvidia-uvm
''; '';
}; };
systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia "L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin"; systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia [ "L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin" ];
services.udev.extraRules = '' services.udev.extraRules = ''
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c 195 255'" KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c 195 255'"