From 93bef3b301c93bb272cd13ca02178b9db7ae0e58 Mon Sep 17 00:00:00 2001 From: ashisgreat22 Date: Wed, 18 Mar 2026 19:51:53 +0100 Subject: [PATCH] fix(adguard): rewrite with correct lib.length syntax Co-Authored-By: Claude Opus 4.6 --- modules/adguard.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/adguard.nix b/modules/adguard.nix index 7064021..99f535c 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -98,18 +98,7 @@ in querylog_file_enabled: true statistics_enabled: true - ${lib.optionalString (cfg.clients != []) '' - clients: - persistent: - ${lib.concatStringsSep "\n " ( - map (client: '' - - name: ${client.name} - ids: - - ${config.sops.placeholder.${client.idSecret}} - '') cfg.clients - )} - '' + '' - + lib.optionalString (lib.length cfg.clients == 0) '' + ${lib.optionalString (lib.length cfg.clients == 0) '' clients: persistent: []