23 lines
406 B
Nix
23 lines
406 B
Nix
{lib}: {
|
|
/**
|
|
Make a NetworkManager wifi profile, to be used with ensureProfiles
|
|
*/
|
|
mkWifiProfile = {
|
|
id,
|
|
ssid,
|
|
priority ? 0,
|
|
wifi-security,
|
|
}: {
|
|
connection = {
|
|
inherit id;
|
|
type = "wifi";
|
|
autoconnect-priority = priority;
|
|
};
|
|
ipv4.method = "auto";
|
|
wifi = {
|
|
mode = "infrastructure";
|
|
inherit ssid;
|
|
};
|
|
inherit wifi-security;
|
|
};
|
|
}
|