2022-10-01 18:53:20 +01:00
|
|
|
{ config, pkgs, lib, ... } :
|
|
|
|
let
|
|
|
|
inherit (pkgs.liminix.networking) interface address hostapd route dnsmasq;
|
2022-10-02 16:35:55 +01:00
|
|
|
inherit (pkgs.liminix.services) oneshot longrun bundle target;
|
2022-10-01 18:53:20 +01:00
|
|
|
in rec {
|
2023-03-07 22:02:24 +00:00
|
|
|
services.loopback = config.hardware.networkInterfaces.lo;
|
2022-10-01 18:53:20 +01:00
|
|
|
|
2022-10-18 22:28:07 +01:00
|
|
|
imports = [ ../../modules/wlan.nix ];
|
|
|
|
|
2023-03-03 22:52:33 +00:00
|
|
|
services.wlan = config.hardware.networkInterfaces.wlan_24;
|
2022-10-01 18:53:20 +01:00
|
|
|
|
|
|
|
services.hostap = hostapd (services.wlan) {
|
|
|
|
params = {
|
|
|
|
ssid = "liminix";
|
|
|
|
country_code = "GB";
|
|
|
|
hw_mode="g";
|
|
|
|
channel = "2";
|
|
|
|
wmm_enabled = 1;
|
|
|
|
ieee80211n = 1;
|
|
|
|
wpa_passphrase = "colourless green ideas";
|
|
|
|
auth_algs = 1; # 1=wpa2, 2=wep, 3=both
|
|
|
|
wpa = 2; # 1=wpa, 2=wpa2, 3=both
|
|
|
|
wpa_key_mgmt = "WPA-PSK";
|
|
|
|
wpa_pairwise = "TKIP CCMP"; # auth for wpa (may not need this?)
|
|
|
|
rsn_pairwise = "CCMP"; # auth for wpa2
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.default = target {
|
|
|
|
name = "default";
|
2023-02-22 18:41:41 +00:00
|
|
|
contents = with config.services; [
|
2022-10-01 18:53:20 +01:00
|
|
|
loopback
|
|
|
|
hostap
|
|
|
|
];
|
|
|
|
};
|
|
|
|
defaultProfile.packages = with pkgs; [ tcpdump ] ;
|
|
|
|
}
|