Commit Graph

41 Commits

Author SHA1 Message Date
Michele Guerini Rocco
dc91f91987
Merge pull request #286393 from oddlama/fix-hostapd-utf8-ssid
nixos/hostapd: fix utf8Ssid setting not properly honored
2024-02-14 14:08:46 +01:00
Sergei Trofimovich
275855d632 nixos: hostapd: drop unused crda package import 2024-02-06 22:45:01 +00:00
oddlama
b7f29692c0
nixos/hostapd: fix utf8Ssid setting not properly honored 2024-02-05 00:52:08 +01:00
Tom Fitzhenry
9e7c877de7 nixos/hostapd: remove managementFrameProtection 2023-10-24 23:54:44 +11:00
Tom Fitzhenry
9f7335d449 nixos/hostapd: document that legacy example should have optional MFP
Thinkpad x230, for example, is unable to connect to the legacy example
if managementFrameProtection is required.
2023-10-24 23:46:57 +11:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
oddlama
bbac87a2dd
nixos/hostapd: add missing stringification of path in INI format 2023-08-11 22:44:08 +02:00
oddlama
0ac2ba763f
nixos/hostapd: fix regression after refactoring to RFC42.
Switching from submodule notation from ({name, ...}: {}) to (submob: {}) seems to require a different accessing scheme.
2023-07-25 18:40:51 +02:00
Rishi Desai
efba841aeb nixos/hostapd: add AF_PACKET to RestrictAddressFamilies 2023-07-21 21:11:14 -05:00
oddlama
1fa9f03eec
nixos/hostapd: rewrite to support multi-AP, password from file, and more
At this point this is basically a full rewrite of this module, which
is a breaking change and was necessary to properly expose the useful
parts of hostapd's config. The notable changes are:

- `hostapd` is now started with additional systemd sandbox/hardening options
- A single-daemon can now manage multiple distinct radios and BSSs, which is
  why all configuration had to be moved into `hostapd.radios`
- By default WPA3-SAE will be used, but WPA2 and WPA3-SAE-TRANSITION are
  supported, too
- Added passwordFile-like options for wpa and sae
- Add new relevant options for MAC ACL, WiFi5, WiFi6 and WiFi7 configuration
- Implements RFC42 as far as reasonable for hostapd
- Removes `with lib;`
2023-07-02 13:32:41 +02:00
Naïm Favier
86a387351a
Merge branch 'master' into nixos/hostapd 2023-02-11 14:03:56 +01:00
Victor Fuentes
d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Scriptkiddi
679e369ba2
nixos/hostapd: add interface type 2021-01-29 13:04:50 +01:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Craig Hall
5d012c4bb2 nixos/hostapd: Enable 802.11n / 802.11ac by default 2020-06-20 20:42:26 +01:00
Craig Hall
8b7740d1b2 nixos/hostapd: Disable insecure TKIP by default
It's possible that setting wpa=2 disables TKIP anyway, but on my machine
I could not get 802.11n to work without setting rsn_pairwise=CCMP.
N.B. rsn_pairwise takes its default from wpa_pairwise.
2020-06-20 20:42:26 +01:00
Craig Hall
4822155d49 nixos/hostapd: Remove blank default for cfg.interface
Leaving this blank leads to a confusing error about systemd unit dependencies.
2020-06-20 20:42:26 +01:00
Lassulus
ef0f57ff8a
Merge pull request #86712 from rardiol/hostapd
nixos/hostapd: country selection, CRDA, logging
2020-05-05 19:51:09 +02:00
Ricardo Ardissone
a55b736a65 nixos/hostapd: conditionally enable ieee80211d 2020-05-04 21:28:56 -03:00
Ricardo Ardissone
d6d0442243 nixos/hostapd: add logLevel option 2020-05-04 00:31:09 -03:00
Ricardo Ardissone
c09c054231 nixos/hostapd: add countryCode option 2020-05-04 00:31:09 -03:00
Ricardo Ardissone
151d32d22c nixos/hostapd: use CRDA
Needed for regulatory compliance and unlocking some channels.
2020-05-03 23:57:33 -03:00
Dominik Xaver Hörl
c10d82358f treewide: add types to boolean / enable options or make use of mkEnableOption 2020-04-27 09:32:01 +02:00
Dominik Xaver Hörl
0412bde942 treewide: add bool type to enable options, or make use of mkEnableOption
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
2020-04-21 08:55:36 +02:00
Silvan Mosberger
478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Félix Baylac-Jacqué
5121f8d1e6
hostapd: starting hostapd systemd service at boot. 2019-06-24 00:26:27 +02:00
Félix Baylac-Jacqué
98deb87354
hostapd: Add noscan mode.
Applies OpenWRT's noscan patch to hostapd and the relevant option to
the hostapd module.

This noscan patch adds a new `noscan` option allowing us to create
some overlapping BSSs in HT40+/- mode.

Note: this option is disabled by default, we leave this up to the end
user whether it should be enabled or not.

Not being able to create those overlapping BSSs is basically
preventing us to use 802.11n in any urban area where chances to
overlap with another SSID are extremely high.

The patch we are using is a courtesy of the openwrt team and is
applied to the defaul hostapd package in both OpenWRT and Archlinux.
2019-06-24 00:26:20 +02:00
Maximilian Bosch
f975bbae11
nixos/hostapd: escape interface names for hostapd
Same problem as described in acbadcdbba.

When using multiple interfaces for wifi with `networking.wlanInterfaces`
and the interface for `hostapd` contains a dash, this will fail as
systemd escapes dashes in its device names.
2019-04-12 19:27:19 +02:00
Bob van der Linden
1a567685b2
nixos/hostapd: /var/run -> /run 2019-03-24 21:15:26 +01:00
clefru
725fcdef3f Fix hostapd's place in systemd dependency tree. (#45464)
* nat/bind/dhcp.service:
  Remove. Those services have nothing to do with a link-level service.

* sys-subsystem-net-devices-${if}.device:
  Add as BindsTo dependency as this will make hostapd stop when the
  device is unplugged.

* network-link-${if}.service:
  Add hostapd as dependency for this service via requiredBy clause,
  so that the network link is only considered to be established
  only after hostapd has started.

* network.target:
  Remove this from wantedBy clause as this is already implied from
  dependencies stacked above hostapd. And if it's not implied than
  starting hostapd is not required for this particular network
  configuration.
2018-10-17 09:18:52 +02:00
Mikhail Klementev
d8f6ca1afa hostapd: use WPA2 instead of WPA1 by default 2018-06-30 11:33:11 +00:00
Yegor Timoshenko
35375aa7ed
hostapd: remove assertion (allow 5GHz channels) 2018-05-11 13:56:18 +03:00
Joachim Schiele
ca17f3b8ef hostapd dependency fix for https://github.com/nixos/nixpkgs/issues/16090 (#26573) 2017-06-14 16:44:46 +02:00
Eric Sagnes
fb26d561ed hostapd module: use enum 2016-11-16 22:36:26 +09:00
Emery Hemingway
b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Jakob Gillich
ae4a7f9351 hostapd: rename extraCfg -> extraConfig, added asserts 2015-12-26 11:37:00 +01:00
Tobias Geerinckx-Rice
214a9537c8 hostapd service: improve option descriptions 2015-12-05 23:42:56 +01:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00