wpa_supplicant: compatibility with nix branch

Well, partial.
Let's see when I need EAP again...
This commit is contained in:
Geoffrey Frogeye 2023-10-28 20:49:14 +02:00
parent a8133a9dba
commit 59ef201eab
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -17,14 +17,10 @@ country=NL
community.general.passwordstore doesn't support path with spaces in it, 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. 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 suffixes = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=suffixes') or [''] %}
{% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %} {% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %}
{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or 'wpa' %} {% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or ('wpa' if pass else 'open') %}
{% 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 %}
# {{ name }} # {{ name }}
{% for suffix in suffixes %} {% for suffix in suffixes %}
network={ network={