nix-config/modules/hardware/wifi.nix
2025-09-30 11:56:32 +02:00

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" = {
pskRaw = "ext:psk_ruiter";
};
"kargadoor" = {
pskRaw = "ext:psk_kargadoor";
};
"Hete plek" = {
pskRaw = "ext:psk_hotspot";
};
"Woestgaafsecure Gamelab" = {
pskRaw = "ext:psk_sticky";
};
"Utrecht University" = {
authProtocols = ["WPA-EAP"];
auth = ''
eap=PEAP
identity=ext:identity_uni
password=ext:psk_uni
phase2="auth=MSCHAPV2"
'';
};
};
};
};
}