liminix/modules/wwan/default.nix

32 lines
825 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
let
2024-05-15 16:36:16 +00:00
inherit (pkgs) liminix;
inherit (lib) mkOption types;
in {
2024-06-02 17:27:59 +00:00
imports = [
../service-trigger
];
2024-05-15 16:36:16 +00:00
options = {
system.service.wwan.huawei-e3372 = mkOption {
2024-05-15 16:36:16 +00:00
type = liminix.lib.types.serviceDefn;
};
};
2024-05-14 17:07:33 +00:00
config = {
kernel.config = {
USB_NET_HUAWEI_CDC_NCM = "y";
USB_USBNET = "y";
USB_SERIAL = "y";
USB_SERIAL_OPTION = "y";
};
# https://www.0xf8.org/2017/01/flashing-a-huawei-e3372h-4g-lte-stick-from-hilink-to-stick-mode/
system.service.wwan.huawei-e3372 = config.system.callService ./huawei-e3372.nix {
2024-05-15 16:36:16 +00:00
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 17:07:33 +00:00
};
}