nixpkgs/nixos/modules
Maximilian Bosch de0a39166b
wpa_supplicant: allow both imperative and declarative networks
For a while now it's possible to specify an additional config file in
`wpa_supplicant`[1]. In contrast to the file specified via `-c` this was
supposed to be used for immutable settings and not e.g. additional
networks.

However I'm a little bit unhappy about the fact that one has to choose
between a fully imperative setup and a fully declarative one where the
one would have to write credentials for e.g. WPA2-enterprise networks
into the store.

The primary problem with the current state of `wpa_supplicant` is that
if the `SAVE_CONFIG` command is invoked (e.g. via `wpa_cli`), all known
networks will be written to `/etc/wpa_supplicant.conf` and thus all
declarative networks would get out of sync with the declarative
settings.

To work around this, I had to change the following things:

* The `networking.wireless`-module now uses `-I` for declarative config,
  so the user-controlled mode can be used along with the
  `networks`-option.

* I added an `ro`-field to the `ssid`-struct in the
  `wpa_supplicant`-sources. This will be set to `1` for each network
  specified in the config passed via `-I`.

  Whenever config is written to the disk, those networks will be
  skipped, so changes to declarative networks are only temporary.

[1] https://w1.fi/cgit/hostap/commit/wpa_supplicant?id=e6304cad47251e88d073553042f1ea7805a858d1
2021-04-16 13:18:25 +02:00
..
config nixos/users: require one of users.users.name.{isSystemUser,isNormalUser} 2021-04-14 20:40:00 +02:00
hardware Merge pull request #117551 from TredwellGit/nixos/rtl-sdr 2021-04-12 20:23:04 +02:00
i18n/input-method fcitx5: update doc 2021-01-24 02:10:23 +01:00
installer treewide: use perl.withPackages when possible 2021-03-31 21:35:37 +02:00
misc nixos/misc/ids: reclaim uid for disnix 2021-03-28 21:40:44 +02:00
profiles nixos/hidepid: drop the module as the hidepid mount option is broken 2021-02-21 13:51:37 +01:00
programs nixos/programs/fish: add shellAbbrs config 2021-04-14 17:37:14 -07:00
security Merge pull request #116369 from m1cr0man/master 2021-03-23 21:31:42 +01:00
services wpa_supplicant: allow both imperative and declarative networks 2021-04-16 13:18:25 +02:00
system Revert "nixos/systemd: provide libidn2 for systemd-resolved" 2021-04-12 18:37:18 +02:00
tasks treewide: fix eval without aliases after 9378fdf87e 2021-04-08 13:33:09 +02:00
testing treewide: use perl.withPackages when possible 2021-03-31 21:35:37 +02:00
virtualisation Merge pull request #117618 from Mic92/docker 2021-04-09 12:43:13 +01:00
module-list.nix Merge pull request #112322 from mohe2015/module/declarative-step-ca 2021-04-12 17:35:54 +02:00
rename.nix nixos/hidepid: drop the module as the hidepid mount option is broken 2021-02-21 13:51:37 +01:00