Created
September 6, 2022 16:33
-
-
Save Informatic/7e025c496e66771436fc32acbbd61e1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
networking.networkmanager = { | |
enable = true; | |
# Let's just use networkmanager for modem support for now | |
unmanaged = [ "wlan0" ]; | |
}; | |
systemd.services.NetworkManager.requires = [ "ModemManager.service" ]; | |
systemd.services.ModemManager.requires = [ "rmtfs.service" ]; | |
# Workaround broken sim detection on UF896 | |
systemd.services.qmi-uim-powercycle = { | |
enable = true; | |
after = [ "sys-subsystem-net-devices-wwan0.device"]; # dev-wwan0qmi0.device" ]; | |
bindsTo = [ "sys-subsystem-net-devices-wwan0.device"]; # dev-wwan0qmi0.device" ]; | |
before = [ "ModemManager.service" ]; | |
wantedBy = [ "ModemManager.service" ]; | |
path = [ pkgs.libqmi ]; | |
script = '' | |
qmicli -pd /dev/wwan0qmi0 --uim-sim-power-off=1 && qmicli -pd /dev/wwan0qmi0 --uim-sim-power-on=1 | |
''; | |
serviceConfig = { | |
Type = "oneshot"; | |
RemainAfterExit = true; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment