diff options
author | Peter Hoeg <peter@speartail.com> | 2017-02-21 16:49:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 16:49:04 +0800 |
commit | 8e5b630b49b4f76cfc096b6911dbe7cb91b653a0 (patch) | |
tree | 2aa04d5fdeab1b3a3a8cbd8789b945be3b7b06e1 /nixos/modules | |
parent | 88cc35f1f470ff04db76517c40c67d4e9fd19690 (diff) | |
parent | 0789a2a4d6d66a6c87308a596c61e5f34c81677c (diff) |
Merge pull request #22264 from peterhoeg/m/modeswitch
usb-modeswitch: 2.2.1 -> 2.5.0 and 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 a304336c731e..6dc82f604333 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 |