nix: use @wheel for trusted-users
[julm/julm-nix.git] / hosts / aubergine / networking / wifi.nix
index f5a78f1a931b5cb76af2ab2978ad595525ec84b8..ea22f21c52cdd36b7c08a6fe02b1274182fb36d6 100644 (file)
@@ -58,6 +58,10 @@ with (import ./names-and-numbers.nix.clear);
   };
   # iw dev wlp5s0 station dump
   # DOC: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
+  systemd.services.hostapd = {
+    unitConfig.StartLimitIntervalSec = 5;
+    serviceConfig.Restart = "always";
+  };
   services.hostapd = {
     enable = true;
     logLevel = 2;
@@ -67,7 +71,7 @@ with (import ./names-and-numbers.nix.clear);
     # a=5GHz, g=2.4GHz
     hwMode = "g";
     ssid = hostName;
-    wpa = false;
+    wpa = true;
     inherit wpaPassphrase;
     countryCode = "FR";
     extraConfig = ''
@@ -80,13 +84,13 @@ with (import ./names-and-numbers.nix.clear);
       ieee80211d=1
       disassoc_low_ack=1
       ignore_broadcast_ssid=1
+      macaddr_acl=0
 
       # WPA2
+      #auth_algs=0 # 0=noauth, 1=wpa, 2=wep, 3=both
       wpa_key_mgmt=WPA-PSK
       wpa_pairwise=CCMP
       rsn_pairwise=CCMP
-      auth_algs=1 # 0=noauth, 1=wpa, 2=wep, 3=both
-      macaddr_acl=0
       # QoS support, also required for full speed on 802.11n/ac/ax
       wmm_enabled=1
       eap_reauth_period=360000