diff --git a/modules/adguard.nix b/modules/adguard.nix index b8cb16a..c0eba2a 100644 --- a/modules/adguard.nix +++ b/modules/adguard.nix @@ -97,7 +97,8 @@ in querylog_enabled: true querylog_file_enabled: true statistics_enabled: true - '' + lib.optionalString (cfg.clients != []) '' + + ${lib.optionalString (cfg.clients != []) '' clients: persistent: ${lib.concatStringsSep "\n " ( @@ -107,6 +108,11 @@ in - ${config.sops.placeholder.${client.idSecret}} '') cfg.clients )} + '' + '' + + lib.optionalString (cfg.clients == []) '' + clients: + persistent: [] + '' + '' filtering: