57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
inherit (lib) mkEnableOption mkIf;
|
|
cfg = config.horseman.hardware.wifi;
|
|
in {
|
|
options = {
|
|
horseman.hardware.wifi = {
|
|
enable = mkEnableOption "";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
wpa_supplicant_gui
|
|
];
|
|
|
|
networking.wireless = {
|
|
enable = true;
|
|
userControlled.enable = true;
|
|
allowAuxiliaryImperativeNetworks = true;
|
|
|
|
secretsFile = toString config.age.secrets.wifi.path;
|
|
|
|
networks = {
|
|
"Wi-Fi de Ruiters" = {
|
|
psk = "ext:psk_ruiter";
|
|
};
|
|
|
|
"kargadoor" = {
|
|
psk = "ext:psk_kargadoor";
|
|
};
|
|
|
|
"Hete plek" = {
|
|
psk = "ext:psk_hotspot";
|
|
};
|
|
|
|
"Woestgaafsecure Gamelab" = {
|
|
psk = "ext:psk_sticky";
|
|
};
|
|
|
|
"Utrecht University" = {
|
|
authProtocols = ["WPA-EAP"];
|
|
auth = ''
|
|
eap=PEAP
|
|
identity="k.j.deruiter@students.uu.nl"
|
|
password="ext:psk_uni"
|
|
phase2="auth=MSCHAPV2"
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|