wrap uevent-watch in a service

This commit is contained in:
Daniel Barlow
2024-06-02 18:27:59 +01:00
parent f091bbd706
commit 884d8d194e
4 changed files with 76 additions and 5 deletions

View File

@@ -53,11 +53,16 @@ let
buildInputs = [ modeswitch ];
run = "${uevent-watch}/bin/uevent-watch -s ${modeswitch.name} devtype=usb_device product=12d1/14fe/102";
})
(longrun {
name = "watch-for-modem";
isTrigger = true;
buildInputs = [ atz ];
run = "${uevent-watch}/bin/uevent-watch -n /dev/modem -s ${atz.name} subsystem=tty attrs.idVendor=12d1 attrs.idProduct=1506";
(svc.uevent-rule.build {
service = atz;
terms = {
subsystem = "tty";
attrs = {
idVendor = "12d1";
idProduct = "1506";
};
};
symlink = "/dev/modem";
})
];
};