From 5cb262857e260eb12267e506b90c21bfd20de8fd Mon Sep 17 00:00:00 2001 From: kurogeek Date: Wed, 9 Sep 2026 04:15:18 +0000 Subject: [PATCH] inventory/wifi: retry autoconnect and auth indefinitely Set connection.autoconnect-retries=0 and connection.auth-retries=0 on the NetworkManager profiles generated by the clan wifi module for buna, so a flaky AP or slow auth never leaves the connection permanently blocked. --- inventories/default.nix | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/inventories/default.nix b/inventories/default.nix index 897f605..1316794 100644 --- a/inventories/default.nix +++ b/inventories/default.nix @@ -517,17 +517,35 @@ }; }; - wifi = { - module.name = "wifi"; - module.input = "clan-community"; + wifi = + let + networks = { + home = { }; + glom = { }; + }; + in + { + module.name = "wifi"; + module.input = "clan-community"; - roles.default = { - machines."buna" = { - settings.networks.home = { }; - settings.networks.glom = { }; + roles.default = { + machines."buna".settings = { inherit networks; }; + + extraModules = [ + ( + { lib, ... }: + { + # profile names match the network attr names above; + # 0 = retry forever for both (defaults: 4 autoconnect attempts, 3 auth attempts) + networking.networkmanager.ensureProfiles.profiles = lib.mapAttrs (_: _: { + connection.autoconnect-retries = 0; + connection.auth-retries = 0; + }) networks; + } + ) + ]; }; }; - }; }; };