2024-03-11 14:33:12 +01:00
|
|
|
{
|
|
|
|
config,
|
2024-03-11 14:37:04 +01:00
|
|
|
pkgs,
|
2024-03-11 14:33:12 +01:00
|
|
|
...
|
|
|
|
}: {
|
2024-03-18 10:05:49 +01:00
|
|
|
sops.age.keyFile = /home/max/.config/sops/age/keys.txt;
|
2024-03-15 14:55:18 +01:00
|
|
|
sops.secrets."home/ssid" = {
|
|
|
|
sopsFile = ../../secrets/wifi.yaml;
|
|
|
|
};
|
|
|
|
sops.secrets."home/psk" = {
|
2024-03-11 14:33:12 +01:00
|
|
|
sopsFile = ../../secrets/wifi.yaml;
|
|
|
|
};
|
2024-03-18 10:05:49 +01:00
|
|
|
sops.secrets."eduroam/ident" = {
|
|
|
|
sopsFile = ../../secrets/wifi.yaml;
|
|
|
|
};
|
|
|
|
sops.secrets."eduroam/psk" = {
|
|
|
|
sopsFile = ../../secrets/wifi.yaml;
|
|
|
|
};
|
|
|
|
sops.templates."eduroam.nmconnection".content = ''
|
|
|
|
[connection]
|
|
|
|
id=eduroam
|
|
|
|
type=wifi
|
|
|
|
|
|
|
|
[wifi]
|
|
|
|
mode=infrastructure
|
|
|
|
ssid=eduroam
|
|
|
|
|
|
|
|
[wifi-security]
|
|
|
|
auth-alg=open
|
|
|
|
key-mgmt=wpa-eap
|
|
|
|
|
|
|
|
[802-1x]
|
|
|
|
anonymous-identity=anonymous@uni-hannover.de
|
|
|
|
ca-cert=${./T-TeleSec_GlobalRoot_Class_2.crt}
|
|
|
|
domain-suffix-match=radius-dfn.luis.uni-hannover.de
|
|
|
|
eap=ttls;
|
|
|
|
identity=${config.sops.placeholder."eduroam/ident"}
|
|
|
|
password=${config.sops.placeholder."eduroam/psk"}
|
|
|
|
phase2-auth=mschapv2
|
|
|
|
'';
|
|
|
|
environment.etc."NetworkManager/system-connections/eduroam.nmconnection".source = config.sops.templates."eduroam.nmconnection".path;
|
2024-03-15 14:00:06 +01:00
|
|
|
networking.networkmanager = {
|
2024-03-08 23:28:19 +01:00
|
|
|
enable = true;
|
2024-03-15 14:55:18 +01:00
|
|
|
ensureProfiles.profiles = {
|
|
|
|
home = {
|
|
|
|
connection = {
|
|
|
|
id = "Please Hack";
|
|
|
|
type = "wifi";
|
|
|
|
};
|
|
|
|
wifi = {
|
|
|
|
mode = "infrastructure";
|
|
|
|
ssid = "Please Hack";
|
|
|
|
};
|
|
|
|
wifi-security = {
|
|
|
|
key-mgmt = "wpa-psk";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
eduroam = {
|
|
|
|
connection = {
|
|
|
|
id = "eduroam";
|
|
|
|
type = "wifi";
|
|
|
|
};
|
|
|
|
wifi = {
|
|
|
|
mode = "infrastructure";
|
|
|
|
ssid = "eduroam";
|
|
|
|
};
|
|
|
|
wifi-security = {
|
|
|
|
key-mgmt = "wpa-eap";
|
|
|
|
};
|
|
|
|
"802-1x" = {
|
|
|
|
anonymous-identity = "anonymous@uni-hannover.de";
|
|
|
|
ca-cert = "${./T-TeleSec_GlobalRoot_Class_2.crt}";
|
|
|
|
domain-suffix-match = "radius-dfn.luis.uni-hannover.de";
|
|
|
|
eap = "ttls;";
|
|
|
|
phase2-auth = "mschapv2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
luhbotsNet5 = {
|
|
|
|
connection = {
|
|
|
|
id = "luhbotsNet5";
|
|
|
|
type = "wifi";
|
|
|
|
autoconnect-priority = "10";
|
|
|
|
};
|
|
|
|
wifi = {
|
|
|
|
mode = "infrastructure";
|
|
|
|
ssid = "luhbotsNet5";
|
|
|
|
};
|
|
|
|
wifi-security = {
|
|
|
|
key-mgmt = "wpa-psk";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
luhbotsNet = {
|
|
|
|
connection = {
|
|
|
|
id = "luhbotsNet";
|
|
|
|
type = "wifi";
|
|
|
|
autoconnect-priority = "5";
|
|
|
|
};
|
|
|
|
wifi = {
|
|
|
|
mode = "infrastructure";
|
|
|
|
ssid = "luhbotsNet";
|
|
|
|
};
|
|
|
|
wifi-security = {
|
|
|
|
key-mgmt = "wpa-psk";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-03-08 23:28:19 +01:00
|
|
|
};
|
2024-03-11 14:37:04 +01:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-03-15 14:00:06 +01:00
|
|
|
nm-tray
|
2024-03-11 14:37:04 +01:00
|
|
|
];
|
2024-03-08 23:28:19 +01:00
|
|
|
}
|