diff --git a/modules/adguard.nix b/modules/adguard.nix index 42ebd9c..c1cb0a6 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -98,15 +98,16 @@ in querylog_file_enabled: true statistics_enabled: true - clients: - persistent: - ${lib.concatStringsSep "\n " ( - map (client: '' - - name: ${client.name} - ids: - - ${config.sops.placeholder.${client.idSecret}} - '') cfg.clients - )} + ${lib.optionalString (cfg.clients != []) '' + clients: + persistent: + ${lib.concatStringsSep "\n " ( + map (client: '' + - name: ${client.name} + ids: + - ${config.sops.placeholder.${client.idSecret}} + '') cfg.clients + )} filtering: protection_enabled: true