Fix AdGuard filter ID type (string to integer)

This commit is contained in:
ashisgreat22 2026-03-18 22:02:44 +01:00
parent 7ea9246d74
commit 8a9c513fde

View file

@ -80,7 +80,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Generate a temporary JSON file containing the filters for yq to inject # Generate a temporary JSON file containing the filters for yq to inject
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"f /run/adguardhome_filters.json 0644 root root - ${builtins.toJSON { filters = map (f: { inherit (f) name url enabled; id = (builtins.hashString "sha256" f.url); }) cfg.filters; }}" "f /run/adguardhome_filters.json 0644 root root - ${builtins.toJSON { filters = lib.imap0 (i: f: { inherit (f) name url enabled; id = i + 1; }) cfg.filters; }}"
]; ];
services.adguardhome = { services.adguardhome = {