From 59ef201eab2372ed0601fcd17749cf405e8f3ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sat, 28 Oct 2023 20:49:14 +0200 Subject: [PATCH] wpa_supplicant: compatibility with nix branch Well, partial. Let's see when I need EAP again... --- .../roles/system/templates/wpa_supplicant.conf.j2 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/config/automatrop/roles/system/templates/wpa_supplicant.conf.j2 b/config/automatrop/roles/system/templates/wpa_supplicant.conf.j2 index b380481..fde574b 100644 --- a/config/automatrop/roles/system/templates/wpa_supplicant.conf.j2 +++ b/config/automatrop/roles/system/templates/wpa_supplicant.conf.j2 @@ -17,14 +17,10 @@ country=NL community.general.passwordstore doesn't support path with spaces in it, so we're using a `ssid` attribute, which default to the names for SSIDs without space. #} +{% set pass = lookup('community.general.passwordstore', 'wifi/' + name) %} {% set suffixes = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=suffixes') or [''] %} {% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %} -{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or 'wpa' %} -{% if type in ('wpa', 'wep', 'wpa-eap') %} -{% set pass = lookup('community.general.passwordstore', 'wifi/' + name) %} -{% else %} -{% set pass = 'Error, no pass for type ' + type %} -{% endif %} +{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or ('wpa' if pass else 'open') %} # {{ name }} {% for suffix in suffixes %} network={