adding this line to my configuration.nix services.udev.extraRules = ''ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod a+w /sys/class/backlight/$attr{type}/brightness"'';
causes the error /bin/chmod is called by udev rules but is not executable or does not exist
when running sudo nixos-rebuild switch --flake 'flake/#shivanix'
where chmod
places the executable at /run/current-system/sw/bin/chmod
, not at /bin/chmod
my configuration.nix []
I have searched for over 3 hours for this error. The only replication of this error anywhere online is in this thread: .
The solution is, and i quote, "You’ll need to do something like substituteInPlace
to change the FHS paths to nix store paths". Not only does this function have little to no documentation, especially in relation to this problem(i'm relatively new to nixos), the idea that I need to fix something which is a builtin function of the OS and the only way to add custom udev rules is a completely absurd idea.
Yes, the only way. UDEV is read-only, and you're unable to change this by any means within nixos to my knowledge (i tried many, remounting, restarting system services, everything anywhere online told me to try)
I also fumbled around trying to use writeTextFile
which was one persons solution to creating custom UDEV rules, this was also frivolous after about an hour and seems like a bad way to do it anyway.
and seem to be related, however they are solved and already merged.
I'm at a loss. I'm open to anything. 3 hours of my life so far just trying to set one custom udev rule...
i even tried just copying the executable to /bin/chmod
out of desperation and it still gave the same error
anything helps, everyone...love
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745043706a4607966.html
评论列表(0条)