add mdevd as module

following the upstream example, it republishes uevent messages
using multicast group 4 instead of group 2 as used by udev.
This commit is contained in:
Daniel Barlow 2024-04-14 21:59:23 +01:00
parent b231664a06
commit b6a054c588
2 changed files with 18 additions and 0 deletions

View file

@ -19,6 +19,7 @@
./kernel ./kernel
./outputs/kexecboot.nix ./outputs/kexecboot.nix
./mount ./mount
./mdevd.nix
./network ./network
./ntp ./ntp
./outputs.nix ./outputs.nix

17
modules/mdevd.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, pkgs, lib, ...} :
let inherit (pkgs.liminix.services) oneshot longrun bundle target;
in {
config = {
services = rec {
mdevd = longrun {
name = "mdevd";
notification-fd = 3;
run = "${pkgs.mdevd}/bin/mdevd -D 3 -b 200000 -O4";
};
mdevd-coldplug = oneshot {
name ="mdev-coldplug";
up = "${pkgs.mdevd}/bin/mdevd-coldplug";
};
};
};
}