liminix

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

configuration.nix (1081B)


      1 { config, pkgs, lib, ... } :
      2 let
      3   inherit (pkgs.liminix.networking) interface address hostapd route dnsmasq;
      4   inherit (pkgs.liminix.services) oneshot longrun bundle target;
      5 in rec {
      6   services.loopback = config.hardware.networkInterfaces.lo;
      7 
      8   imports = [
      9     ../../modules/wlan.nix
     10     ../../modules/hostapd
     11   ];
     12 
     13   services.hostap = config.system.service.hostapd.build {
     14     interface = config.hardware.networkInterfaces.wlan_24;
     15     params = {
     16       ssid = "liminix";
     17       country_code = "GB";
     18       hw_mode="g";
     19       channel = "2";
     20       wmm_enabled = 1;
     21       ieee80211n = 1;
     22       wpa_passphrase = "colourless green ideas";
     23       auth_algs = 1; # 1=wpa2, 2=wep, 3=both
     24       wpa = 2;       # 1=wpa, 2=wpa2, 3=both
     25       wpa_key_mgmt = "WPA-PSK";
     26       wpa_pairwise = "TKIP CCMP";   # auth for wpa (may not need this?)
     27       rsn_pairwise = "CCMP";        # auth for wpa2
     28     };
     29   };
     30 
     31   services.default = target {
     32     name = "default";
     33     contents = with config.services; [
     34       loopback
     35       hostap
     36     ];
     37   };
     38   defaultProfile.packages = with pkgs;  [ tcpdump ] ;
     39 }