about summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2017-02-21 16:49:04 +0800
committerGitHub <noreply@github.com>2017-02-21 16:49:04 +0800
commit8e5b630b49b4f76cfc096b6911dbe7cb91b653a0 (patch)
tree2aa04d5fdeab1b3a3a8cbd8789b945be3b7b06e1 /nixos/modules/hardware
parent88cc35f1f470ff04db76517c40c67d4e9fd19690 (diff)
parent0789a2a4d6d66a6c87308a596c61e5f34c81677c (diff)
downloadnixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar.gz
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar.bz2
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar.lz
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar.xz
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.tar.zst
nixlib-8e5b630b49b4f76cfc096b6911dbe7cb91b653a0.zip
Merge pull request #22264 from peterhoeg/m/modeswitch
usb-modeswitch: 2.2.1 -> 2.5.0 and nixos module
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/usb-wwan.nix26
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 ];
+  };
+}