From 3348c34a96510b045e59f1bb75272bcf831f2523 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 10 Oct 2023 23:30:19 +0000 Subject: [PATCH] kerrigan: back to using modem in ECM mode; no ModemManager In this configuration we don't properly support IPv6. So be it, for now. --- ops/nixos/kerrigan/default.nix | 71 +++++++------------ .../kerrigan/networkmanager/EE.nmconnection | 16 ----- 2 files changed, 27 insertions(+), 60 deletions(-) delete mode 100644 ops/nixos/kerrigan/networkmanager/EE.nmconnection diff --git a/ops/nixos/kerrigan/default.nix b/ops/nixos/kerrigan/default.nix index c48c16c29b..5671d0d4ff 100644 --- a/ops/nixos/kerrigan/default.nix +++ b/ops/nixos/kerrigan/default.nix @@ -39,19 +39,6 @@ in domain = "as205479.net"; hostId = "c424eeb8"; useNetworkd = true; - networkmanager = { - enable = true; - dns = "systemd-resolved"; - unmanaged = [ "*,except:type:gsm,except:interface-name:enu*" ]; - extraConfig = '' - [main] - no-auto-default=* - - [logging] - level=TRACE - domains=ALL - ''; - }; nameservers = [ "2001:4860:4860::8888" "2001:4860:4860::8844" @@ -59,6 +46,8 @@ in "8.8.4.4" ]; interfaces.eth2.useDHCP = true; + interfaces.enu1u4i10.useDHCP = true; + firewall.interfaces.br0.allowedTCPPorts = [ 80 ]; }; users.users.lukegb.extraGroups = lib.mkAfter [ "networkmanager" ]; my.systemType = "aarch64-linux"; @@ -75,17 +64,20 @@ in systemd.network.networks.br0 = { matchConfig.Name = "br0"; networkConfig = { - LinkLocalAddressing = "ipv6"; - Address = "10.42.0.1/24"; - IPForward = true; - IPMasquerade = "ipv4"; - IPv6AcceptRA = true; + Address = [ "10.42.0.1/24" "2a09:a443:ee::1/64" ]; DHCPServer = true; + IPv6SendRA = true; }; - ipv6AcceptRAConfig = { - UseGateway = false; - RouteMetric = 100; - }; + ipv6Prefixes = [{ + ipv6PrefixConfig = { + Prefix = "2a09:a443:ee::/64"; + }; + }]; + ipv6RoutePrefixes = [{ + ipv6RoutePrefixConfig = { + Route = "::/0"; + }; + }]; dhcpServerConfig = { PoolOffset = 100; PoolSize = 100; @@ -96,34 +88,25 @@ in networkConfig.Bridge = "br0"; }; - systemd.services.ModemManager = { - wantedBy = [ "network.target" ]; + environment.systemPackages = with pkgs; [ + libqmi screen minicom conntrack-tools + ]; + + services.caddy = { + enable = true; + extraConfig = '' + 10.42.0.1:80 { + reverse_proxy /mbbstatus http://add-on.ee.co.uk { + header_up Host add-on.ee.co.uk + } + } + ''; }; - environment.etc = nmBits; boot.loader.efi.canTouchEfiVariables = false; boot.loader.systemd-boot.enable = true; - services.radvd = { - enable = true; - config = '' - interface br0 { - IgnoreIfMissing on; - AdvSendAdvert on; - AdvLinkMTU 1280; - - prefix ffff:ffff:ffff:ffff::/64 { - Base6Interface wwan0; - AdvValidLifetime 600; - AdvPreferredLifetime 300; - }; - }; - ''; - }; - systemd.services."systemd-networkd-wait-online".wantedBy = lib.mkForce []; - systemd.services."ModemManager".serviceConfig.ExecStart = ["" "${pkgs.modemmanager}/sbin/ModemManager --debug"]; - system.stateVersion = "23.05"; } diff --git a/ops/nixos/kerrigan/networkmanager/EE.nmconnection b/ops/nixos/kerrigan/networkmanager/EE.nmconnection deleted file mode 100644 index a985ddfec9..0000000000 --- a/ops/nixos/kerrigan/networkmanager/EE.nmconnection +++ /dev/null @@ -1,16 +0,0 @@ -[connection] -id=EE -uuid=f4c3ad45-d4a3-44ee-b29f-af10b5974d22 -type=gsm - -[gsm] -apn=everywhere - -[ipv4] -method=auto - -[ipv6] -addr-gen-mode=default -method=auto - -[proxy]