Merge pull request 'clanServices/wifi: fix autoConnect setting not doing anything' (#4204) from push-msokoouryrwq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4204
This commit is contained in:
@@ -73,9 +73,10 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.networkmanager.ensureProfiles.profiles = flip mapAttrs settings.networks (
|
networking.networkmanager.ensureProfiles.profiles = flip mapAttrs settings.networks (
|
||||||
name: _network: {
|
name: networkCfg: {
|
||||||
connection.id = "$ssid_${name}";
|
connection.id = "$ssid_${name}";
|
||||||
connection.type = "wifi";
|
connection.type = "wifi";
|
||||||
|
connection.autoconnect = networkCfg.autoConnect;
|
||||||
wifi.mode = "infrastructure";
|
wifi.mode = "infrastructure";
|
||||||
wifi.ssid = "$ssid_${name}";
|
wifi.ssid = "$ssid_${name}";
|
||||||
wifi-security.psk = "$pw_${name}";
|
wifi-security.psk = "$pw_${name}";
|
||||||
@@ -102,7 +103,7 @@ in
|
|||||||
# Generate the secrets file
|
# Generate the secrets file
|
||||||
echo "Generating wifi secrets file: $env_file"
|
echo "Generating wifi secrets file: $env_file"
|
||||||
${flip (concatMapAttrsStringSep "\n") settings.networks (
|
${flip (concatMapAttrsStringSep "\n") settings.networks (
|
||||||
name: _network: ''
|
name: _networkCfg: ''
|
||||||
echo "ssid_${name}=\"$(cat "${ssid_path name}")\"" >> /run/secrets/NetworkManager/wifi-secrets
|
echo "ssid_${name}=\"$(cat "${ssid_path name}")\"" >> /run/secrets/NetworkManager/wifi-secrets
|
||||||
echo "pw_${name}=\"$(cat "${password_path name}")\"" >> /run/secrets/NetworkManager/wifi-secrets
|
echo "pw_${name}=\"$(cat "${password_path name}")\"" >> /run/secrets/NetworkManager/wifi-secrets
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user