diff options
author | Andrew Childs <lorne@cons.org.nz> | 2019-05-05 17:23:32 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2019-05-05 19:39:50 +0900 |
commit | 178f455494ff02e1fcf37e7a6c7acedad754e01f (patch) | |
tree | 2c7035b2141e9a1e294a43f26d484656c389373b /nixos/modules/hardware/usb-wwan.nix | |
parent | dd641f7f8bf135a5cfb61bd724829e9ec9902462 (diff) | |
download | nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar.gz nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar.bz2 nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar.lz nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar.xz nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.tar.zst nixpkgs-178f455494ff02e1fcf37e7a6c7acedad754e01f.zip |
[WIP] usb_modeswitch
Diffstat (limited to 'nixos/modules/hardware/usb-wwan.nix')
-rw-r--r-- | nixos/modules/hardware/usb-wwan.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/hardware/usb-wwan.nix b/nixos/modules/hardware/usb-wwan.nix index 2d20421586a..679a6c6497c 100644 --- a/nixos/modules/hardware/usb-wwan.nix +++ b/nixos/modules/hardware/usb-wwan.nix @@ -21,6 +21,19 @@ with lib; ###### implementation config = mkIf config.hardware.usbWwan.enable { + # Attaches device specific handlers. services.udev.packages = with pkgs; [ usb-modeswitch-data ]; + + # Triggered by udev, usb-modeswitch creates systemd services via a + # template unit in the usb-modeswitch package. + systemd.packages = with pkgs; [ usb-modeswitch ]; + + # The systemd service requires the usb-modeswitch-data. The + # usb-modeswitch package intends to discover this via the + # filesystem at /usr/share/usb_modeswitch, and merge it with user + # configuration in /etc/usb_modeswitch.d. Configuring the correct + # path in the package is difficult, as it would cause a cyclic + # dependency. + environment.etc."usb_modeswitch.d".source = "${pkgs.usb-modeswitch-data}/share/usb_modeswitch"; }; } |