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 | |
parent | cad335eb0110ef9ff708d12da34d053b5fbddcb0 (diff) | |
download | nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar.gz nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar.bz2 nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar.lz nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar.xz nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.tar.zst nixlib-0789a2a4d6d66a6c87308a596c61e5f34c81677c.zip |
usb-wwan: nixos module
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/hardware/usb-wwan.nix | 26 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
2 files changed, 27 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 ]; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 81597d91d89a..175ba182b4b8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -38,6 +38,7 @@ ./hardware/network/rtl8192c.nix ./hardware/opengl.nix ./hardware/pcmcia.nix + ./hardware/usb-wwan.nix ./hardware/video/amdgpu.nix ./hardware/video/amdgpu-pro.nix ./hardware/video/ati.nix |