Desktop/networkManager: refactor
This commit is contained in:
parent
8c6fdd5b51
commit
7277135a5b
3 changed files with 29 additions and 23 deletions
18
lib/networkManager.nix
Normal file
18
lib/networkManager.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue