1
0
Fork 0

huawei-cdc-ncm kernel driver -> module

This commit is contained in:
Daniel Barlow 2024-07-14 12:07:28 +01:00
parent bc9ced5d38
commit 725d8b608f
1 changed files with 21 additions and 7 deletions

View File

@ -2,6 +2,10 @@
let
inherit (pkgs) liminix;
inherit (lib) mkOption types;
huawei-cdc-ncm = pkgs.kmodloader.override {
targets = ["huawei_cdc_ncm"];
inherit (config.system.outputs) kernel;
};
in {
imports = [
../service-trigger
@ -14,18 +18,28 @@ in {
};
config = {
kernel.config = {
USB_NET_HUAWEI_CDC_NCM = "y";
USB_NET_HUAWEI_CDC_NCM = "m";
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 {
system.service.wwan.huawei-e3372 =
let svc = config.system.callService ./huawei-e3372.nix {
apn = mkOption { type = types.str; };
username = mkOption { type = types.str; };
password = mkOption { type = types.str; };
authType = mkOption { type = types.enum [ "pap" "chap" ]; };
};
in
svc // {
build = args :
let args' = args // {
dependencies = (args.dependencies or []) ++
[huawei-cdc-ncm];
};
in svc.build args' ;
};
};
}