fix(adguard): rewrite with correct lib.length syntax

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ashisgreat22 2026-03-18 19:51:53 +01:00
parent 7bdbe767b6
commit 93bef3b301

View file

@ -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: []