liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

mdevd.nix (834B)


      1 { config, pkgs, ... }:
      2 let
      3   inherit (pkgs.liminix.services) oneshot longrun;
      4 in
      5 {
      6   config = {
      7     services = rec {
      8       mdevd = longrun {
      9         name = "mdevd";
     10         notification-fd = 3;
     11         run = "${pkgs.mdevd}/bin/mdevd -D 3 -b 200000 -O4";
     12       };
     13       devout = longrun {
     14         name = "devout";
     15         notification-fd = 10;
     16         timeout-up = 60 * 1000;
     17         run = "exec ${pkgs.devout}/bin/devout /run/devout.sock 4";
     18         dependencies = [ mdevd ];
     19       };
     20       coldplug = oneshot {
     21         name = "coldplug";
     22         # would love to know what mdevd-coldplug/udevadm trigger does
     23         # that this doesn't
     24         up = ''
     25           for i in $(find /sys -name uevent); do ( echo change > $i ) ; done
     26         '';
     27         dependencies = [
     28           devout
     29           mdevd
     30         ];
     31       };
     32     };
     33   };
     34 }