2024-05-14 23:19:34 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
2024-05-15 18:36:16 +02:00
|
|
|
inherit (pkgs) liminix;
|
|
|
|
inherit (lib) mkOption types;
|
2024-05-14 23:19:34 +02:00
|
|
|
svc = config.system.service;
|
|
|
|
in {
|
2024-05-15 18:36:16 +02:00
|
|
|
options = {
|
|
|
|
system.service.wwan = mkOption {
|
|
|
|
type = liminix.lib.types.serviceDefn;
|
|
|
|
};
|
|
|
|
};
|
2024-05-14 19:07:33 +02:00
|
|
|
config = {
|
|
|
|
kernel.config = {
|
|
|
|
USB_NET_HUAWEI_CDC_NCM = "y";
|
|
|
|
USB_USBNET = "y";
|
|
|
|
USB_SERIAL = "y";
|
|
|
|
USB_SERIAL_OPTION = "y";
|
|
|
|
};
|
|
|
|
|
2024-05-14 23:19:34 +02:00
|
|
|
# https://www.0xf8.org/2017/01/flashing-a-huawei-e3372h-4g-lte-stick-from-hilink-to-stick-mode/
|
2024-05-15 18:36:16 +02:00
|
|
|
system.service.wwan = config.system.callService ./wwan.nix {
|
|
|
|
apn = mkOption { type = types.str; };
|
|
|
|
username = mkOption { type = types.str; };
|
|
|
|
password = mkOption { type = types.str; };
|
|
|
|
authType = mkOption { type = types.enum [ "pap" "chap" ]; };
|
2024-05-14 23:19:34 +02:00
|
|
|
};
|
2024-05-14 19:07:33 +02:00
|
|
|
};
|
|
|
|
}
|