1 { pkgs, lib, config, ... }:
2 with (import ./names-and-numbers.nix);
4 inherit (config.users) users;
7 networking.nftables.ruleset = ''
10 iifname ${lteIface} jump input-net
11 iifname ${lteIface} log level warn prefix "input-net: " counter drop
14 ip daddr 10.151.0.1 tcp dport 8080 counter accept \
15 comment "mmsd: Prixtel/SFR"
18 oifname ${lteIface} jump output-net
19 oifname ${lteIface} log level warn prefix "output-net: " counter drop
21 chain forward-to-net {
23 chain forward-from-net {
25 chain forward-to-net { }
26 chain forward-from-net { }
28 iifname { ${wifiIface}, ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } oifname ${lteIface} goto forward-to-net
29 iifname ${lteIface} oifname { ${wifiIface}, ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } goto forward-from-net
34 iifname { ${wifiIface}, ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } oifname ${lteIface} masquerade
38 services.mmsd.enable = true;
39 services.mmsd.extraArgs = [ "--debug" ];
40 systemd.services.ModemManager.serviceConfig.ExecStart =
43 "${pkgs.modemmanager-1-18}/bin/ModemManager --debug"
44 #"${pkgs.modemmanager-1-20-4}/bin/ModemManager --debug"
46 systemd.services.NetworkManager.wants = [ "ModemManager.service" ];
47 services.dbus.packages = [ pkgs.dconf ];
48 programs.dconf.enable = true;
49 environment.etc."NetworkManager/system-connections/Prixtel.nmconnection" = {
54 uuid=b223f550-dff1-4ba3-9755-cd4557faaa5a
57 autoconnect-priority=999
70 dhcp-send-hostname=false
74 addr-gen-mode=stable-privacy
76 dhcp-send-hostname=false
81 systemd.services.watch-lte = {
82 after = [ "NetworkManager-wait-online.service" ];
83 requires = [ "NetworkManager-wait-online.service" ];
84 wantedBy = [ "network-online.target" ];
85 #startAt = "*:0/5"; # every 5 min
86 path = with pkgs; [ inetutils networkmanager ];
87 unitConfig = { StartLimitIntervalSec = 0; };
90 IPAddressAllow = [ "9.9.9.9" ];
91 RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ];
92 ExecStart = pkgs.writeShellScript "watch-lte" ''
96 nmcli connection up Prixtel
99 Restart = "on-failure";
103 environment.systemPackages = [
104 pkgs.modem-manager-gui
107 pkgs.gnome.gnome-contacts
112 # https://gitlab.com/mobian1/callaudiod/-/issues/26
113 # https://gitlab.com/mobian1/callaudiod/-/issues/27