1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-21 15:01:36 +03:00
mobile-nixos/examples/hello/workaround-v4l_id-hang.nix
Samuel Dionne-Riel 3d0552223d examples/hello: introduce a minimal useful example system
The examples/hello system can be used by users that want to boot a
minimal, and cross-compilable system.

This is better than a "raw" build of the root of the Mobile NixOS repo
since it provides a stage-2 application stating the system booted
successfully.
2020-05-31 18:54:07 -04:00

18 lines
460 B
Nix

# This works around an issue on at least one device (motorola-addison) where
# the v4l_id tool from udev hangs for more than a minute on boot.
#
# This replaces the file from udev with an empty one.
{ pkgs, lib, ... }:
let
emptyV4lRules = pkgs.runCommandNoCC "empty-v4l-rules" {} ''
mkdir -p $out/lib/udev/rules.d
touch $out/lib/udev/rules.d/60-persistent-v4l.rules
'';
in
{
services.udev.packages = lib.mkOrder 10000 [
emptyV4lRules
];
}