liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (1015B)


      1 ## Hostapd
      2 ## =======
      3 ##
      4 ## Hostapd (host access point daemon) enables a wireless network
      5 ## interface to act as an access point and authentication server,
      6 ## providing IEEE 802.11 access point management, and IEEE
      7 ## 802.1X/WPA/WPA2/EAP Authenticators. In less technical terms,
      8 ## this service is what you need for your Liminix device to
      9 ## provide a wireless network that clients can connect to.
     10 ##
     11 ## If you have more than one wireless network interface (e.g.
     12 ## wlan0, wlan1) you can run an instance of hostapd on each of them.
     13 
     14 {
     15   lib,
     16   pkgs,
     17   config,
     18   ...
     19 }:
     20 let
     21   inherit (lib) mkOption types;
     22   inherit (pkgs) liminix;
     23 in
     24 {
     25   imports = [ ../secrets ];
     26   options = {
     27     system.service.hostapd = mkOption {
     28       type = liminix.lib.types.serviceDefn;
     29     };
     30   };
     31   config = {
     32     system.service.hostapd = config.system.callService ./service.nix {
     33       interface = mkOption {
     34         type = liminix.lib.types.service;
     35       };
     36       params = mkOption {
     37         type = types.attrs;
     38       };
     39     };
     40   };
     41 }