2023-01-10 02:38:06 +01:00
|
|
|
{ config, lib, ... }: {
|
|
|
|
# Wireless secrets stored through agenix
|
2023-01-10 16:05:48 +01:00
|
|
|
age.secrets.wireless.file = ./wifi_passwords.age;
|
2023-01-10 02:38:06 +01:00
|
|
|
|
|
|
|
networking.wireless = {
|
|
|
|
enable = true;
|
|
|
|
fallbackToWPA2 = false;
|
|
|
|
|
|
|
|
# Declarative
|
|
|
|
environmentFile = config.age.secrets.wireless.path;
|
|
|
|
networks = {
|
|
|
|
"Neptune".psk = "@PHONE_HOTSPOT_PASS@";
|
|
|
|
"TP-Link_522C".psk = "@TG_HOME_PASS@";
|
2023-01-15 21:37:30 +01:00
|
|
|
"Sailhorse".psk = "@NL_SAILHORSE_PASS@";
|
2023-02-08 04:31:15 +01:00
|
|
|
"FOSDEM-Dualstack" = {};
|
2023-01-10 02:38:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Imperative
|
|
|
|
allowAuxiliaryImperativeNetworks = true;
|
|
|
|
userControlled = {
|
|
|
|
enable = true;
|
|
|
|
group = "network";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Ensure group exists
|
|
|
|
users.groups.network = { };
|
|
|
|
|
|
|
|
# Persist imperative config
|
|
|
|
# environment.persistence = {
|
|
|
|
# "/persist".files = [
|
|
|
|
# "/etc/wpa_supplicant.conf"
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
}
|