services.udev.extraRules causes novel error (NIXOS) - Stack Overflow

adding this line to my configuration.nix services.udev.extraRules = ''ACTION=="add"

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

相关推荐

  • services.udev.extraRules causes novel error (NIXOS) - Stack Overflow

    adding this line to my configuration.nix services.udev.extraRules = ''ACTION=="add"

    7小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信