diff options
author | Valentin Shirokov <regellosigkeitsaxiom@yandex.ru> | 2017-01-07 20:19:32 +0800 |
---|---|---|
committer | Valentin Shirokov <regellosigkeitsaxiom@yandex.ru> | 2017-01-07 20:23:12 +0800 |
commit | e138d3afdfbbc49fe0c21e0534806b11b700c598 (patch) | |
tree | 4c87923d2941d5b23ecd247c32e8e14632d14b95 /nixos/modules/services | |
parent | c5f8c7fe36be6b1c587dcd1ce5886d90f9aa5d69 (diff) | |
download | nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar.gz nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar.bz2 nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar.lz nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar.xz nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.tar.zst nixlib-e138d3afdfbbc49fe0c21e0534806b11b700c598.zip |
Added option networking.wireless.networks.*.priority
It is literal 'priority' option of wpa_supplicant.conf
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/wpa_supplicant.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 5657b91c1e72..c91ba91fcb4d 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -12,11 +12,13 @@ let psk = if networkConfig.psk != null then ''"${networkConfig.psk}"'' else networkConfig.pskRaw; + priority = networkConfig.priority; in '' network={ ssid="${ssid}" ${optionalString (psk != null) ''psk=${psk}''} ${optionalString (psk == null) ''key_mgmt=NONE''} + ${optionalString (priority != null) ''priority=${toString priority}''} } '') cfg.networks)} '' else "/etc/wpa_supplicant.conf"; @@ -68,6 +70,19 @@ in { Mutually exclusive with <varname>psk</varname>. ''; }; + priority = mkOption { + type = types.nullOr types.int; + default = null; + description = '' + By default, all networks will get same priority group (0). If some of the + networks are more desirable, this field can be used to change the order in + which wpa_supplicant goes through the networks when selecting a BSS. The + priority groups will be iterated in decreasing priority (i.e., the larger the + priority value, the sooner the network is matched against the scan results). + Within each priority group, networks will be selected based on security + policy, signal strength, etc. + ''; + }; }; }); description = '' |