From 25217f0b820b3bc1b74b1f1e4204e8aa2a7430bc Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 9 Nov 2021 20:31:46 +0100 Subject: [PATCH] pkgs/ap: move uciDeleteAll outside `uci batch` --- nix/pkgs/ap.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/ap.nix b/nix/pkgs/ap.nix index 3e57358..ae984f5 100644 --- a/nix/pkgs/ap.nix +++ b/nix/pkgs/ap.nix @@ -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};