Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cdf79db19d6c
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 81daa1e5dcea
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Dec 26, 2019

  1. nvidia: fix $ substitution in udev rules

    This fixes a harmless error from systemd-udevd that looks like:
    
      Dec 23 15:35:23 dellbook systemd-udevd[696]:
      /nix/store/iixya3ni5whybpq9zz1h7f4pyw7nhd19-udev-rules/99-local.rules:25
      Invalid value "..." for RUN (char 101: invalid substitution type),
      ignoring, but please fix it.
    
    Using $$ fixes it using the escaping documented at https://www.freedesktop.org/software/systemd/man/udev.html.
    matthewbauer committed Dec 26, 2019
    Copy the full SHA
    6689a38 View commit details

Commits on Dec 30, 2019

  1. Copy the full SHA
    b43479d View commit details

Commits on Jan 2, 2020

  1. Merge pull request #76546 from matthewbauer/nvidia-fix-udev-rules

    nvidia: fix $ substitution in udev rules
    matthewbauer authored Jan 2, 2020
    Copy the full SHA
    81daa1e View commit details
Showing with 5 additions and 4 deletions.
  1. +5 −4 nixos/modules/hardware/video/nvidia.nix
9 changes: 5 additions & 4 deletions nixos/modules/hardware/video/nvidia.nix
Original file line number Diff line number Diff line change
@@ -198,10 +198,11 @@ in
# Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
services.udev.extraRules =
''
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'"
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'"
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
'';

boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];