diff --git a/nix/configurations/vanadium/nixos/connectivity.nix b/nix/configurations/vanadium/nixos/connectivity.nix index 304aa6a9..a4293cdc 100644 --- a/nix/configurations/vanadium/nixos/connectivity.nix +++ b/nix/configurations/vanadium/nixos/connectivity.nix @@ -31,33 +31,25 @@ userControlled.enable = true; secretsFile = config.age.secrets.wpa_password.path; networks = let - ordered = nss: - lib.pipe nss [ - lib.lists.reverseList - (lib.lists.imap0 (i: lib.mapAttrs (_: n: n // {priority = i;}))) - lib.mergeAttrsList - ]; + orderedByGroups = networkGroups: let + groupsCount = builtins.length networkGroups; + withPriority = + lib.lists.imap0 + (i: lib.mapAttrs (_: n: n // {priority = groupsCount - i;})) + networkGroups; + in + lib.mkMerge withPriority; in - ordered [ - # first in list is tried first - {"HiddenParadize@Earth2077".pskRaw = "ext:HOME";} + orderedByGroups [ { + "HiddenParadize@Earth2077".pskRaw = "ext:HOME"; "Pei’s Wifi".pskRaw = "ext:PEI"; - "estrich".pskRaw = "ext:ESTRICH"; - "girlypop-net".pskRaw = "ext:MEOW"; + "girlypop-net".pskRaw = "ext:GIRLYPOP"; "annapurna".pskRaw = "ext:ANNAPURNA"; - "5526-1".pskRaw = "ext:TYLER"; - "A-WAY".pskRaw = "ext:AWAYCAFE"; + "5526-1".pskRaw = "ext:5526-1"; } { - "_SNCF_WIFI_INOUI" = {}; - "_WIFI_LYRIA" = {}; - "EurostarTrainsWiFi" = {}; - "SBB-FREE" = {}; - "AOT Airport Free Wi-Fi by NT" = {}; - } - { - gast-ost.pskRaw = "ext:GAST_OST"; + "A-WAY".pskRaw = "ext:A-WAY"; eduroam = { authProtocols = ["WPA-EAP"]; auth = '' @@ -73,7 +65,16 @@ ''; }; } - {"iPhone de Léana 江".pskRaw = "ext:PHONE";} + { + "_SNCF_WIFI_INOUI" = {}; + "_WIFI_LYRIA" = {}; + "EurostarTrainsWiFi" = {}; + "SBB-FREE" = {}; + "AOT Airport Free Wi-Fi by NT" = {}; + } + { + "iPhone de Léana 江".pskRaw = "ext:PHONE"; + } ]; }; }; diff --git a/nix/secrets/wpa_password.age b/nix/secrets/wpa_password.age index 300acd3c..551966b0 100644 Binary files a/nix/secrets/wpa_password.age and b/nix/secrets/wpa_password.age differ