On 17-05-12 05:02pm, Profpatsch wrote:
> systemd.service.myUsbService =
> let startupScript = ''
> #!${pkgs.bash}
> echo "0b05 17e8" | tee /sys/bus/usb/drivers/rt2800usb/new_id
> '';
> in {
> description = "get my US WiFi to work";
> wantedBy = [ "default.target" ];
> serviceConfig = {
> ExecStart = startupScript;
> };
> };
aszlig just told me that this can be done shorter:
systemd.service.myUsbService = {
description = "get my US WiFi to work";
bindsTo = [ "sys-subsystem-net-devices-XXX.device" ];
script = "echo 0b05 17e8 | tee /sys/bus/usb/drivers/rt2800usb/new_id";
}
see `man systemd.device`.
--
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
_______________________________________________
nix-dev mailing list
[email protected]
https://mailman.science.uu.nl/mailman/listinfo/nix-dev