{ lib, config, ... }: let hostname = "pi5"; in { # Networking configs networking = { hostName = hostname; defaultGateway.address = "10.0.1.1"; nameservers = [ "10.0.1.1" ]; firewall = { enable = true; allowPing = true; }; # Enable Network Manager networkmanager = { enable = lib.mkDefault true; wifi.powersave = lib.mkDefault false; settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; ensureProfiles = { environmentFiles = [ config.sops.secrets.wifi.path ]; profiles = { "Joey's Jungle 5G" = { connection = { id = "Joey's Jungle 5G"; type = "wifi"; }; ipv4 = { method = "auto"; }; ipv6 = { addr-gen-mode = "stable-privacy"; method = "auto"; }; wifi = { mode = "infrastructure"; ssid = "Joey's Jungle 5G"; }; wifi-security = { key-mgmt = "sae"; psk = "$PSK"; }; }; }; }; }; }; }