Merge pull request #318924 from SuperSandro2000/317188

nixos/nvidia: fix eval with virtualisation.docker.enableNvidia enabled
This commit is contained in:
Sandro 2024-06-11 18:05:00 +02:00 committed by GitHub
commit 5428ca74ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -288,7 +288,7 @@ in
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 = ''
# 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'"