liminix/modules/hostapd/default.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

## Hostapd
## =======
##
## Hostapd (host access point daemon) enables a wireless network
## interface to act as an access point and authentication server,
## providing IEEE 802.11 access point management, and IEEE
## 802.1X/WPA/WPA2/EAP Authenticators. In less technical terms,
## this service is what you need for your Liminix device to
## provide a wireless network that clients can connect to.
##
## If you have more than one wireless network interface (e.g.
## wlan0, wlan1) you can run an instance of hostapd on each of them.
2023-07-16 18:50:06 +02:00
{ lib, pkgs, config, ...}:
let
inherit (lib) mkOption types;
2023-08-05 13:21:18 +02:00
inherit (pkgs) liminix;
2023-07-16 18:50:06 +02:00
in {
options = {
system.service.hostapd = mkOption {
2023-08-05 13:21:18 +02:00
type = liminix.lib.types.serviceDefn;
2023-07-16 18:50:06 +02:00
};
system.service.hostapd-ready = mkOption {
type = liminix.lib.types.serviceDefn;
};
2023-07-16 18:50:06 +02:00
};
config = {
2023-08-05 13:21:18 +02:00
system.service.hostapd = liminix.callService ./service.nix {
interface = mkOption {
type = liminix.lib.types.service;
};
package = mkOption {
type = types.package;
default = pkgs.hostapd;
};
2023-08-05 13:21:18 +02:00
params = mkOption {
type = types.attrs;
};
};
system.service.hostapd-ready = liminix.callService ./ready.nix {
interface = mkOption {
type = liminix.lib.types.interface;
description = "Interface for which to wait that the oper state Master or Master (VLAN) has been reached.";
};
};
2023-07-16 18:50:06 +02:00
};
}