From b6a054c588b42a3d5744403f40e420fd7c3a2d11 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 14 Apr 2024 21:59:23 +0100 Subject: [PATCH] add mdevd as module following the upstream example, it republishes uevent messages using multicast group 4 instead of group 2 as used by udev. --- modules/all-modules.nix | 1 + modules/mdevd.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/mdevd.nix diff --git a/modules/all-modules.nix b/modules/all-modules.nix index 6b432ce..9a0bf8d 100644 --- a/modules/all-modules.nix +++ b/modules/all-modules.nix @@ -19,6 +19,7 @@ ./kernel ./outputs/kexecboot.nix ./mount + ./mdevd.nix ./network ./ntp ./outputs.nix diff --git a/modules/mdevd.nix b/modules/mdevd.nix new file mode 100644 index 0000000..43cf063 --- /dev/null +++ b/modules/mdevd.nix @@ -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"; + }; + }; + }; +}