nix-config/modules/hardware/wifi.nix

42 lines
783 B
Nix

{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.horseman.hardware.wifi;
in {
options = {
horseman.hardware.wifi = {
enable = mkEnableOption "";
};
};
config = mkIf cfg.enable {
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"
'';
};
};
};
};
}