diff options
author | Deven Lahoti <deven.lahoti@gmail.com> | 2018-08-07 23:07:13 -0400 |
---|---|---|
committer | Deven Lahoti <deven.lahoti@gmail.com> | 2018-08-09 15:20:44 -0500 |
commit | 8d6128208d2f59043c2d7253dc438bf9463b1c08 (patch) | |
tree | 355db5aee12b426f4eba72bb60bbf6cf715f0d30 /nixos/modules | |
parent | b55c02e878b7b0677cd3f7ca3d041c07f8b58051 (diff) | |
download | nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar.gz nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar.bz2 nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar.lz nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar.xz nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.tar.zst nixpkgs-8d6128208d2f59043c2d7253dc438bf9463b1c08.zip |
nixos/wireless: add `extraConfig` section to `networking.wireless`
This allows the user to add `wpa_supplicant` config options not yet supported by Nix without having to write the entire `wpa_supplicant.conf` file manually.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/networking/wpa_supplicant.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/wpa_supplicant.nix b/nixos/modules/services/networking/wpa_supplicant.nix index 4bae05b6dd3..c788528fa47 100644 --- a/nixos/modules/services/networking/wpa_supplicant.nix +++ b/nixos/modules/services/networking/wpa_supplicant.nix @@ -8,6 +8,7 @@ let ${optionalString cfg.userControlled.enable '' ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=${cfg.userControlled.group} update_config=1''} + ${cfg.extraConfig} ${concatStringsSep "\n" (mapAttrsToList (ssid: config: with config; let key = if psk != null then ''"${psk}"'' @@ -165,6 +166,17 @@ in { description = "Members of this group can control wpa_supplicant."; }; }; + extraConfig = mkOption { + type = types.str; + default = ""; + example = '' + p2p_disabled=1 + ''; + description = '' + Extra lines appended to the configuration file. + See wpa_supplicant.conf(5) for available options. + ''; + }; }; }; |