Desktop/networkManager: refactor

This commit is contained in:
Toast 2025-12-06 04:16:48 +01:00
parent 8c6fdd5b51
commit 7277135a5b
3 changed files with 29 additions and 23 deletions

View file

@ -1,5 +1,6 @@
{
config,
lib,
flakeSelf,
...
}: let
@ -16,35 +17,21 @@ in {
];
ensureProfiles = {
environmentFiles = [config.sops.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";
};
profiles = with lib.toast.networkManager; {
"4g-modem" = mkWifiProfile {
id = "4G Modem";
priority = 5;
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";
};
phone = mkWifiProfile {
id = "Phone";
priority = 5;
ssid = "Redmi Note 10 Pro_5197";
wifi-security = {
auth-alg = "open";
key-mgmt = "sae";