nixos/udev: silence harmless warnings

`udevRulesFor` generates a lot of warnings like:

  substituteStream(): WARNING: pattern '"/sbin/modprobe' doesn't match anything in file '/nix/store/.../95-dm-notify.rules'

due to the (preemptive) substitution of common paths in the default
udev rules. In this case a file having no matches is not unepected
and poses no issue at all.
This commit is contained in:
rnhmjoj 2023-06-06 19:39:38 +02:00
parent c651ca23fd
commit dbcd187add
No known key found for this signature in database
GPG Key ID: BFBAF4C975F76450

View File

@ -72,7 +72,7 @@ let
--replace \"/sbin/blkid \"${pkgs.util-linux}/sbin/blkid \
--replace \"/bin/mount \"${pkgs.util-linux}/bin/mount \
--replace /usr/bin/readlink ${pkgs.coreutils}/bin/readlink \
--replace /usr/bin/basename ${pkgs.coreutils}/bin/basename
--replace /usr/bin/basename ${pkgs.coreutils}/bin/basename 2>/dev/null
${optionalString (initrdBin != null) ''
substituteInPlace $i --replace '/run/current-system/systemd' "${removeSuffix "/bin" initrdBin}"
''}