{ config, flakeSelf, ... }: let tailscaleName = config.services.tailscale.interfaceName; in { age.secrets = { wifiPasswords.file = "${flakeSelf.inputs.secrets}/wifi-passwords.age"; }; networking.networkmanager = { enable = true; unmanaged = [ "interface-name:${tailscaleName}" ]; wifi.macAddress = "random"; ensureProfiles = { environmentFiles = [config.age.secrets.wifiPasswords.path]; profiles = { "4g-modem" = { connection = { id = "4G Modem"; type = "wifi"; autoconnect-priority = 5; }; ipv4.method = "auto"; wifi = { mode = "infrastructure"; ssid = "TP-Link_CCB4"; }; wifi-security = { auth-alg = "open"; key-mgmt = "wpa-psk"; psk = "$MODEM"; }; }; phone = { connection = { id = "Phone"; type = "wifi"; autoconnect-priority = 5; }; ipv4.method = "auto"; wifi = { mode = "infrastructure"; ssid = "Redmi Note 10 Pro_5197"; }; wifi-security = { auth-alg = "open"; key-mgmt = "sae"; psk = "$PHONE"; }; }; }; }; }; }