mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge pull request #270465 from philiptaron/sideband-socket-path
nixos/nvidia: Set SidebandSocketPath to a user-writable path in `/run`
This commit is contained in:
commit
774dca168d
@ -396,6 +396,9 @@ in {
|
||||
modules = [nvidia_x11.bin];
|
||||
display = !offloadCfg.enable;
|
||||
deviceSection =
|
||||
''
|
||||
Option "SidebandSocketPath" "/run/nvidia-xdriver/"
|
||||
'' +
|
||||
lib.optionalString primeEnabled
|
||||
''
|
||||
BusID "${pCfg.nvidiaBusId}"
|
||||
@ -533,8 +536,14 @@ in {
|
||||
|
||||
hardware.firmware = lib.optional cfg.open nvidia_x11.firmware;
|
||||
|
||||
systemd.tmpfiles.rules =
|
||||
lib.optional (nvidia_x11.persistenced != null && config.virtualisation.docker.enableNvidia)
|
||||
systemd.tmpfiles.rules = [
|
||||
# Remove the following log message:
|
||||
# (WW) NVIDIA: Failed to bind sideband socket to
|
||||
# (WW) NVIDIA: '/var/run/nvidia-xdriver-b4f69129' Permission denied
|
||||
#
|
||||
# https://bbs.archlinux.org/viewtopic.php?pid=1909115#p1909115
|
||||
"d /run/nvidia-xdriver 0770 root users"
|
||||
] ++ lib.optional (nvidia_x11.persistenced != null && config.virtualisation.docker.enableNvidia)
|
||||
"L+ /run/nvidia-docker/extras/bin/nvidia-persistenced - - - - ${nvidia_x11.persistenced}/origBin/nvidia-persistenced";
|
||||
|
||||
boot = {
|
||||
|
Loading…
Reference in New Issue
Block a user