{ 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; secretsFile = toString config.age.secrets.wifi.path; networks = { "Wi-Fi de Ruiters" = { pskRaw = "ext:psk_wifideruiter"; }; "kargadoor" = { pskRaw = "ext:psk_kargadoor"; }; "eduroam" = { auth = '' key_mgmt=WPA-EAP eap=PWD identity="ext:identity_eduroam" password="ext:psk_eduroam" ''; }; }; }; }; }