Fix syntax errors
This commit is contained in:
parent
87792bd9af
commit
69269c05a8
4 changed files with 13 additions and 10 deletions
|
@ -6,11 +6,12 @@ let
|
|||
routerCfg = config.services.router;
|
||||
cfg = config.services.router.wireless;
|
||||
in {
|
||||
options.services.wireless = {
|
||||
options.services.router.wireless = {
|
||||
enable = mkEnableOption "router wireless service";
|
||||
|
||||
wleInterface24Ghz = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "wlp1";
|
||||
description = ''
|
||||
Wireless interface name for 2.4 GHz wireless band.
|
||||
|
@ -19,6 +20,7 @@ in {
|
|||
|
||||
wleInterface5Ghz = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "wlp2";
|
||||
description = ''
|
||||
Wireless interface name for 5 GHz wireless band.
|
||||
|
@ -49,11 +51,12 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
imports = mkIf cfg.enable [ ./hostapd5ghz.nix ];
|
||||
#imports = mkIf cfg.enable [ ./hostapd5ghz.nix ];
|
||||
imports = [ ./hostapd5ghz.nix ];
|
||||
|
||||
config = let
|
||||
wle24GhzEnabled = cfg.wleInterface24Ghz != null;
|
||||
wle5GhzEnabled = wleInterface5Ghz != null;
|
||||
wle5GhzEnabled = cfg.wleInterface5Ghz != null;
|
||||
in mkIf cfg.enable {
|
||||
boot.extraModprobeConfig = ''
|
||||
options cfg80211 ieee80211_regdom=${cfg.regulatoryCountryCode}
|
||||
|
@ -135,7 +138,7 @@ in {
|
|||
|
||||
services.hostapd = {
|
||||
enable = wle24GhzEnabled;
|
||||
interface = wleInterface;
|
||||
interface = cfg.wleInterface24Ghz;
|
||||
hwMode = "g";
|
||||
ssid = cfg.ssid;
|
||||
wpaPassphrase = cfg.passphrase;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue