{ sopsSecrets, config, lib, ... }: { options.zpha.configure.networkManagerProfiles.enable = lib.mkEnableOption "NetworkManager profile"; config = lib.mkIf config.zpha.configure.networkManagerProfiles.enable { sops.secrets = { "environments/networkManagerProfiles/zaphyraPhone".sopsFile = sopsSecrets.common; "environments/networkManagerProfiles/grogHome".sopsFile = sopsSecrets.common; }; networking.networkmanager.ensureProfiles = { environmentFiles = [ config.sops.secrets."environments/networkManagerProfiles/zaphyraPhone".path config.sops.secrets."environments/networkManagerProfiles/grogHome".path ]; profiles = { "grogHome" = { connection = { id = "grogHome"; type = "wifi"; uuid = "1bbc0cce-148f-4afa-876e-fa6db67d884e"; }; ipv4 = { method = "auto"; }; ipv6 = { addr-gen-mode = "default"; method = "auto"; }; proxy = { }; wifi = { mode = "infrastructure"; ssid = "$GROG_HOME_SSID"; }; wifi-security = { key-mgmt = "wpa-psk"; psk = "$GROG_HOME_PASS"; }; }; "zaphyraPhone" = { connection = { id = "zaphyraPhone"; type = "wifi"; uuid = "2dc7bb4a-e016-427d-aeb6-28e7a6b91f41"; }; ipv4 = { method = "auto"; }; ipv6 = { addr-gen-mode = "default"; method = "auto"; }; proxy = { }; wifi = { mode = "infrastructure"; ssid = "$ZAPHYRA_PHONE_SSID"; }; wifi-security = { auth-alg = "open"; key-mgmt = "wpa-psk"; psk = "$ZAPHYRA_PHONE_PASS"; }; }; }; }; }; }