diff options
author | Peter Hoeg <peter@speartail.com> | 2017-02-18 11:35:58 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2017-02-21 16:35:27 +0800 |
commit | 0789a2a4d6d66a6c87308a596c61e5f34c81677c (patch) | |
tree | d69a265c3516eccdc606d684f5a3da6dfc5e8b4e /nixos/modules/hardware/usb-wwan.nix | |
parent | cad335eb0110ef9ff708d12da34d053b5fbddcb0 (diff) |
usb-wwan: nixos module
Diffstat (limited to 'nixos/modules/hardware/usb-wwan.nix')
-rw-r--r-- | nixos/modules/hardware/usb-wwan.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/hardware/usb-wwan.nix b/nixos/modules/hardware/usb-wwan.nix new file mode 100644 index 000000000000..2d20421586a7 --- /dev/null +++ b/nixos/modules/hardware/usb-wwan.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + ###### interface + + options = { + + hardware.usbWwan = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enable this option to support USB WWAN adapters. + ''; + }; + }; + }; + + ###### implementation + + config = mkIf config.hardware.usbWwan.enable { + services.udev.packages = with pkgs; [ usb-modeswitch-data ]; + }; +} |