2024-09-21 12:06:01 -04:00
|
|
|
{config, ...}: {
|
2024-08-22 07:46:19 -04:00
|
|
|
age.secrets.wifi.file = ../secrets/wifi.age;
|
|
|
|
|
|
|
|
networking.networkmanager = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
ensureProfiles = {
|
|
|
|
environmentFiles = [config.age.secrets.wifi.path];
|
2024-09-21 12:06:01 -04:00
|
|
|
profiles = let
|
|
|
|
mkOpenWiFi = ssid: {
|
|
|
|
connection.id = "${ssid}";
|
|
|
|
connection.type = "wifi";
|
|
|
|
ipv4.method = "auto";
|
|
|
|
ipv6.addr-gen-mode = "default";
|
|
|
|
ipv6.method = "auto";
|
|
|
|
wifi.mode = "infrastructure";
|
|
|
|
wifi.ssid = "${ssid}";
|
|
|
|
};
|
|
|
|
|
|
|
|
mkWPA2WiFi = ssid: psk: (
|
|
|
|
(mkOpenWiFi ssid)
|
|
|
|
// {
|
|
|
|
wifi-security.auth-alg = "open";
|
|
|
|
wifi-security.key-mgmt = "wpa-psk";
|
|
|
|
wifi-security.psk = "${psk}";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
mkEAPWiFi = ssid: identity: pass: auth: (
|
|
|
|
(mkOpenWiFi ssid)
|
|
|
|
// {
|
|
|
|
"802-1x".eap = "peap;";
|
|
|
|
"802-1x".identity = "${identity}";
|
|
|
|
"802-1x".password = "${pass}";
|
|
|
|
"802-1x".phase2-auth = "${auth}";
|
|
|
|
wifi-security.auth-alg = "open";
|
|
|
|
wifi-security.key-mgmt = "wpa-eap";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in {
|
2024-08-22 07:46:19 -04:00
|
|
|
"Dustin's A54" = mkWPA2WiFi "Dustin's A54" "$DustinsA54PSK";
|
2024-08-28 15:53:55 -04:00
|
|
|
"InmanPerkCustomer" = mkWPA2WiFi "InmanPerkCustomer" "$InmanPerkCustomerPSK";
|
2024-08-22 07:46:19 -04:00
|
|
|
"Muchacho Guest" = mkOpenWiFi "Muchacho Guest";
|
2024-08-29 12:55:19 -04:00
|
|
|
"PERCguest" = mkWPA2WiFi "PERCguest" "$PERCguestPSK";
|
2024-09-18 12:33:00 -04:00
|
|
|
"PERC COFFEE 5 Guest" = mkWPA2WiFi "PERC COFFEE 5 Guest" "$PERCguestPSK";
|
2024-08-25 15:32:08 -04:00
|
|
|
"Parkgrounds1" = mkWPA2WiFi "Parkgrounds1" "$Parkgrounds1PSK";
|
2024-08-22 07:46:19 -04:00
|
|
|
"Stargate-Discovery" = mkWPA2WiFi "Stargate-Discovery" "$StargateDiscoveryPSK";
|
|
|
|
"Taproom Public WiFi" = mkOpenWiFi "Taproom Public WiFi";
|
|
|
|
"WeWorkWiFi" = mkEAPWiFi "WeWorkWiFi" "$WeWorkWiFiIdentity" "$WeWorkWiFiPassword" "mschapv2";
|
2024-08-25 15:32:08 -04:00
|
|
|
"javapatron" = mkOpenWiFi "javapatron";
|
|
|
|
"wallace" = mkWPA2WiFi "wallace" "$wallacePSK";
|
2024-08-22 07:46:19 -04:00
|
|
|
};
|
|
|
|
};
|
2024-09-21 12:06:01 -04:00
|
|
|
|
|
|
|
wifi = {
|
|
|
|
backend = "iwd";
|
|
|
|
powersave = true;
|
|
|
|
};
|
2024-08-22 07:46:19 -04:00
|
|
|
};
|
2024-07-19 22:25:16 -04:00
|
|
|
}
|