40 lines
814 B
Nix
40 lines
814 B
Nix
|
{ lib, ... }:
|
||
|
|
||
|
let network-config-default = {
|
||
|
connection = {
|
||
|
type = "wifi";
|
||
|
permissions = "";
|
||
|
};
|
||
|
wifi = {
|
||
|
mac-address-blacklist = "";
|
||
|
mode = "infrastructure";
|
||
|
};
|
||
|
wifi-security = {
|
||
|
auth-alg = "open";
|
||
|
key-mgmt = "wpa-psk";
|
||
|
};
|
||
|
ipv4 = {
|
||
|
dns-search = "";
|
||
|
method = "auto";
|
||
|
};
|
||
|
ipv6 = {
|
||
|
addr-gen-mode = "stable-privacy";
|
||
|
dns-search = "";
|
||
|
method = "auto";
|
||
|
};
|
||
|
};
|
||
|
in {
|
||
|
networking.networkmanager.enable = true;
|
||
|
networking.networkmanager.wifi.powersave = true; # We assume only laptops use wifi
|
||
|
|
||
|
networking.networkmanager.ensureProfiles.profiles = {
|
||
|
KnyfNet = lib.recursiveUpdate network-config-default {
|
||
|
connection.id = "KnyfNet";
|
||
|
wifi.ssid = "KnyfNet";
|
||
|
wifi-security.psk = "ltzlhznhzd";
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|
||
|
# vim: tabstop=2 softtabstop=2
|