mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:13:55 -05:00
add new wifi connection + simplify helpers
This commit is contained in:
parent
aae162d0c9
commit
74157fbdc2
|
@ -35,60 +35,36 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mkWPAWiFi = ssid: psk: {
|
mkWPAWiFi = ssid: psk: (
|
||||||
connection = {
|
(mkOpenWiFi ssid)
|
||||||
id = "${ssid}";
|
// {
|
||||||
type = "wifi";
|
wifi-security = {
|
||||||
};
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "${psk}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
ipv4.method = "auto";
|
mkEAPWiFi = ssid: identity: pass: auth: (
|
||||||
|
(mkOpenWiFi ssid)
|
||||||
|
// {
|
||||||
|
"802-1x" = {
|
||||||
|
eap = "peap;";
|
||||||
|
identity = "${identity}";
|
||||||
|
password = "${pass}";
|
||||||
|
phase2-auth = "${auth}";
|
||||||
|
};
|
||||||
|
|
||||||
ipv6 = {
|
wifi-security = {
|
||||||
addr-gen-mode = "default";
|
auth-alg = "open";
|
||||||
method = "auto";
|
key-mgmt = "wpa-eap";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
wifi = {
|
);
|
||||||
mode = "infrastructure";
|
|
||||||
ssid = "${ssid}";
|
|
||||||
};
|
|
||||||
|
|
||||||
wifi-security = {
|
|
||||||
auth-alg = "open";
|
|
||||||
key-mgmt = "wpa-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";
|
||||||
|
"FCS-WiFi2" = mkEAPWiFi "FCS-WiFi2" "$FCSIdentity" "$FCSPassword" "mschapv2";
|
||||||
"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";
|
||||||
|
|
BIN
secrets/wifi.age
BIN
secrets/wifi.age
Binary file not shown.
Loading…
Reference in a new issue