Desktop/NetworkManager: add wifi networks
This commit is contained in:
parent
5f776ae552
commit
5926168b3f
1 changed files with 45 additions and 1 deletions
|
|
@ -1,11 +1,55 @@
|
||||||
{config, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
flakeSelf,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
tailscaleName = config.services.tailscale.interfaceName;
|
tailscaleName = config.services.tailscale.interfaceName;
|
||||||
in {
|
in {
|
||||||
|
age.secrets = {
|
||||||
|
wifiPasswords.file = "${flakeSelf.inputs.secrets}/wifi-passwords.age";
|
||||||
|
};
|
||||||
networking.networkmanager = {
|
networking.networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
unmanaged = [
|
unmanaged = [
|
||||||
"interface-name:${tailscaleName}"
|
"interface-name:${tailscaleName}"
|
||||||
];
|
];
|
||||||
wifi.macAddress = "random";
|
wifi.macAddress = "random";
|
||||||
|
ensureProfiles = {
|
||||||
|
environmentFiles = [config.age.secrets.wifiPasswords.path];
|
||||||
|
profiles = {
|
||||||
|
"4g-modem" = {
|
||||||
|
connection = {
|
||||||
|
id = "4G Modem";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4.method = "auto";
|
||||||
|
wifi = {
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "TP-Link_CCB4";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$MODEM";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
phone = {
|
||||||
|
connection = {
|
||||||
|
id = "Phone";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4.method = "auto";
|
||||||
|
wifi = {
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "Redmi Note 10 Pro_5197";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "sae";
|
||||||
|
psk = "$PHONE";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue