forked from mirrors/nixpkgs
Merge pull request #21733 from regellosigkeitsaxiom/master
Added option networking.wireless.networks.*.priority
This commit is contained in:
commit
94c4eab6cc
|
@ -12,11 +12,13 @@ let
|
||||||
psk = if networkConfig.psk != null
|
psk = if networkConfig.psk != null
|
||||||
then ''"${networkConfig.psk}"''
|
then ''"${networkConfig.psk}"''
|
||||||
else networkConfig.pskRaw;
|
else networkConfig.pskRaw;
|
||||||
|
priority = networkConfig.priority;
|
||||||
in ''
|
in ''
|
||||||
network={
|
network={
|
||||||
ssid="${ssid}"
|
ssid="${ssid}"
|
||||||
${optionalString (psk != null) ''psk=${psk}''}
|
${optionalString (psk != null) ''psk=${psk}''}
|
||||||
${optionalString (psk == null) ''key_mgmt=NONE''}
|
${optionalString (psk == null) ''key_mgmt=NONE''}
|
||||||
|
${optionalString (priority != null) ''priority=${toString priority}''}
|
||||||
}
|
}
|
||||||
'') cfg.networks)}
|
'') cfg.networks)}
|
||||||
'' else "/etc/wpa_supplicant.conf";
|
'' else "/etc/wpa_supplicant.conf";
|
||||||
|
@ -68,6 +70,19 @@ in {
|
||||||
Mutually exclusive with <varname>psk</varname>.
|
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 = ''
|
description = ''
|
||||||
|
|
Loading…
Reference in a new issue