如何在 NixOS 中將規則檔案新增至 /etc/udev/rules.d 中?

如何在 NixOS 中將規則檔案新增至 /etc/udev/rules.d 中?

我正在遵循這個指示:https://github.com/nns779/px4_drv

makefwtool在builds目錄下it930x-firmware.bin和builds核心模組make下。driverpx4_drv

現在it930x.nixpx4_drv.nix就在這裡。

https://gist.github.com/gtgteq/30cb73c344477d26f8c69768e010331a

/etc/udev/rules.d/99-px4video.rulespx4_drv在系統中不顯示。

如何使該規則文件可用?

答案1

按照伊曼紐爾的兩條指示,我的要點得到了更新。

在你的configuration.nix中,嘗試

services.udev.packages = [ px4_drv ]

您可能還需要將 installPhase 中的 udev 路徑更改為$out/lib/udev/rules.d,而不是$out/etc/udev/rules.d

相關內容