Fix syntax errors

This commit is contained in:
Fabian Hauser 2020-05-17 13:52:15 +00:00
parent fad59bbb27
commit 87792bd9af
4 changed files with 156 additions and 144 deletions

View file

@ -2,8 +2,9 @@
with lib;
let routerCfg = config.services.router;
cfg = config.services.router.wireless
let
routerCfg = config.services.router;
cfg = config.services.router.wireless;
in {
options.services.wireless = {
enable = mkEnableOption "router wireless service";
@ -48,16 +49,16 @@ in {
};
};
config = mkIf cfg.enable let
imports = mkIf cfg.enable [ ./hostapd5ghz.nix ];
config = let
wle24GhzEnabled = cfg.wleInterface24Ghz != null;
wle5GhzEnabled = wleInterface5Ghz != null;
in {
in mkIf cfg.enable {
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom=${cfg.regulatoryCountryCode}
'';
imports = [ ./hostapd5ghz.nix ];
services.udev.packages = [ pkgs.crda ]; # TODO: Still required with 20.03?
services.hostapd5ghz = {
@ -68,7 +69,8 @@ in {
wpaPassphrase = cfg.passphrase;
channel = 36;
extraConfig = ''
${optionalString wle24GhzEnabled "except-interface=${cfg.wleInterface24Ghz}"}
${optionalString wle24GhzEnabled
"except-interface=${cfg.wleInterface24Ghz}"}
max_num_sta=255
#Details for Connecting Clients via WPA2 TKIP
@ -139,7 +141,8 @@ in {
wpaPassphrase = cfg.passphrase;
channel = 6;
extraConfig = ''
${optionalString wle5GhzEnabled "except-interface=${cfg.wleInterface5Ghz}"}
${optionalString wle5GhzEnabled
"except-interface=${cfg.wleInterface5Ghz}"}
#macaddr_acl sets options for mac address filtering. 0 means "accept unless in deny list"
macaddr_acl=0