From 0789a2a4d6d66a6c87308a596c61e5f34c81677c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sat, 18 Feb 2017 11:35:58 +0800 Subject: usb-wwan: nixos module --- nixos/modules/hardware/usb-wwan.nix | 26 ++++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 nixos/modules/hardware/usb-wwan.nix diff --git a/nixos/modules/hardware/usb-wwan.nix b/nixos/modules/hardware/usb-wwan.nix new file mode 100644 index 00000000000..2d20421586a --- /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 81597d91d89..175ba182b4b 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 -- cgit 1.4.1