pkgs/ap: move uciDeleteAll outside `uci batch`

This commit is contained in:
Astro 2021-11-09 20:31:46 +01:00
parent 50a81b1f8d
commit 25217f0b82
1 changed files with 3 additions and 4 deletions

View File

@ -160,6 +160,9 @@ in ''
'') config.site.sshPubKeys}
# System configuration
${uciDeleteAll "switch.@switch_vlan"}
${uciDeleteAll "wireless.@wifi"}
uci batch <<__UCI__
set system.@system[0].hostname=${hostName}
set dhcp.@dnsmasq[0].enabled=0
@ -175,8 +178,6 @@ in ''
# Switch config
${optionalString hasSwitch ''
${uciDeleteAll "switch.@switch_vlan"}
# Ports ${portsDoc}
${concatMapStrings (net: ''
add network switch_vlan
@ -226,8 +227,6 @@ in ''
'') (builtins.attrNames hostConfig.interfaces)
}
${uciDeleteAll "wireless.@wifi"}
${concatStrings (imap0 (index: path:
let
radioConfig = hostConfig.wifi.${path};