]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/ME909u-521.nix
tmux: remove upstreamed patch and config
[julm/julm-nix.git] / nixos / profiles / hardware / ME909u-521.nix
1 # Configuration for the ME909u-521 mini PCIe card (12d1:1573)
2 # Beware that productId=1573 has been reused by Huawei for other cards...
3 { pkgs, lib, config, ... }:
4 {
5 # Enable usb_modeswitch
6 hardware.usbWwan.enable = true;
7
8 # Enable ModemManager
9 networking.networkmanager.enable = true;
10
11 # https://forum.openwrt.org/t/cdc-ether-ethertype-unknown-0x0808-on-huawei-me909u-521/5509/2
12 # https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/635
13 environment.etc."usb_modeswitch.d".source = lib.mkForce (pkgs.writeTextDir "12d1:1573" ''
14 # Huawei ME909u-521: select the QMI interface, which has qmi_wwan_rx_fixup()
15 Configuration=1
16 '');
17
18 # sudo mmcli --modem 0 --set-allowed-modes='2G|3G|4G' --set-preferred-mode=4G
19
20 environment.systemPackages = [
21 pkgs.libqmi
22 ];
23
24 }