diff options
author | Nick Cao <nickcao@nichi.co> | 2023-07-25 19:24:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 19:24:14 -0600 |
commit | 9ae5c2de7fc82170d65296041b2f4822e5ec8459 (patch) | |
tree | dbf6edb7cf56aac204e67499357077f0f2073240 /nixos/modules/hardware | |
parent | 68cca030422246aa882a0c671878ad379d8e1843 (diff) | |
parent | 7c309898bcac42058a4e80e7f8bb69436cefb265 (diff) | |
download | nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar.gz nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar.bz2 nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar.lz nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar.xz nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.tar.zst nixpkgs-9ae5c2de7fc82170d65296041b2f4822e5ec8459.zip |
Merge pull request #244572 from MinerSebas/usb-modeswitch-module-rename
nixos/usb-modeswitch: Rename module from usbWwan
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/usb-modeswitch.nix (renamed from nixos/modules/hardware/usb-wwan.nix) | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/modules/hardware/usb-wwan.nix b/nixos/modules/hardware/usb-modeswitch.nix index 69673872cf9..773891b0032 100644 --- a/nixos/modules/hardware/usb-wwan.nix +++ b/nixos/modules/hardware/usb-modeswitch.nix @@ -7,12 +7,15 @@ with lib; options = { - hardware.usbWwan = { + hardware.usb-modeswitch = { enable = mkOption { type = types.bool; default = false; description = lib.mdDoc '' - Enable this option to support USB WWAN adapters. + Enable this option to support certain USB WLAN and WWAN adapters. + + These network adapters initial present themselves as Flash Drives containing their drivers. + This option enables automatic switching to the networking mode. ''; }; }; @@ -20,7 +23,11 @@ with lib; ###### implementation - config = mkIf config.hardware.usbWwan.enable { + imports = [ + (mkRenamedOptionModule ["hardware" "usbWwan" ] ["hardware" "usb-modeswitch" ]) + ]; + + config = mkIf config.hardware.usb-modeswitch.enable { # Attaches device specific handlers. services.udev.packages = with pkgs; [ usb-modeswitch-data ]; |