fix(adguard): handle empty clients list

Only render clients section when clients are configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ashisgreat22 2026-03-18 19:22:58 +01:00
parent 23696e7e79
commit 294b556542

View file

@ -98,15 +98,16 @@ in
querylog_file_enabled: true querylog_file_enabled: true
statistics_enabled: true statistics_enabled: true
clients: ${lib.optionalString (cfg.clients != []) ''
persistent: clients:
${lib.concatStringsSep "\n " ( persistent:
map (client: '' ${lib.concatStringsSep "\n " (
- name: ${client.name} map (client: ''
ids: - name: ${client.name}
- ${config.sops.placeholder.${client.idSecret}} ids:
'') cfg.clients - ${config.sops.placeholder.${client.idSecret}}
)} '') cfg.clients
)}
filtering: filtering:
protection_enabled: true protection_enabled: true