mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 13:51:54 -05:00
base/networking: add mkEAPWiFi function helper
This commit is contained in:
parent
43b1c2e840
commit
04b5014f7a
|
@ -22,9 +22,7 @@
|
||||||
type = "wifi";
|
type = "wifi";
|
||||||
};
|
};
|
||||||
|
|
||||||
ipv4 = {
|
ipv4.method = "auto";
|
||||||
method = "auto";
|
|
||||||
};
|
|
||||||
|
|
||||||
ipv6 = {
|
ipv6 = {
|
||||||
addr-gen-mode = "default";
|
addr-gen-mode = "default";
|
||||||
|
@ -43,9 +41,7 @@
|
||||||
type = "wifi";
|
type = "wifi";
|
||||||
};
|
};
|
||||||
|
|
||||||
ipv4 = {
|
ipv4.method = "auto";
|
||||||
method = "auto";
|
|
||||||
};
|
|
||||||
|
|
||||||
ipv6 = {
|
ipv6 = {
|
||||||
addr-gen-mode = "default";
|
addr-gen-mode = "default";
|
||||||
|
@ -63,29 +59,41 @@
|
||||||
psk = "${psk}";
|
psk = "${psk}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mkEAPWiFi = ssid: identity: pass: auth: {
|
||||||
|
"802-1x" = {
|
||||||
|
eap = "PEAP";
|
||||||
|
identity = "${identity}";
|
||||||
|
password = "${pass}";
|
||||||
|
phase2-auth = "${auth}";
|
||||||
|
};
|
||||||
|
|
||||||
|
connection = {
|
||||||
|
id = "${ssid}";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
|
||||||
|
ipv4.method = "auto";
|
||||||
|
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "default";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi = {
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "${ssid}";
|
||||||
|
};
|
||||||
|
|
||||||
|
wifi-security.key-mgmt = "wpa-eap";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
"Dustin's A54" = mkWPAWiFi "Dustin's A54" "$DustinsA54PSK";
|
"Dustin's A54" = mkWPAWiFi "Dustin's A54" "$DustinsA54PSK";
|
||||||
"javapatron" = mkOpenWiFi "javapatron";
|
"javapatron" = mkOpenWiFi "javapatron";
|
||||||
"Stargate-Discovery" = mkWPAWiFi "Stargate-Discovery" "$StargateDiscoveryPSK";
|
"Stargate-Discovery" = mkWPAWiFi "Stargate-Discovery" "$StargateDiscoveryPSK";
|
||||||
"Taproom Public WiFi" = mkOpenWiFi "Taproom Public WiFi";
|
"Taproom Public WiFi" = mkOpenWiFi "Taproom Public WiFi";
|
||||||
"wallace" = mkWPAWiFi "wallace" "$wallacePSK";
|
"wallace" = mkWPAWiFi "wallace" "$wallacePSK";
|
||||||
|
"WeWorkWiFi" = mkEAPWiFi "WeWorkWiFi" "$WeWorkWiFiIdentity" "$WeWorkWiFiPassword" "mschapv2";
|
||||||
WeWorkWiFi = {
|
|
||||||
"802-1x" = {
|
|
||||||
eap = "peap;";
|
|
||||||
identity = "$WeWorkWiFiIdentity";
|
|
||||||
password = "$WeWorkWiFiPassword";
|
|
||||||
phase2-auth = "mschapv2";
|
|
||||||
};
|
|
||||||
|
|
||||||
connection = {
|
|
||||||
id = "WeWorkWiFi";
|
|
||||||
type = "wifi";
|
|
||||||
};
|
|
||||||
|
|
||||||
wifi-security.key-mgmt = "wpa-eap";
|
|
||||||
wifi.ssid = "WeWorkWiFi";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue