refactor(nixos): derive AdGuard proxy rewrites

This commit is contained in:
2026-10-21 18:37:46 -04:00
parent 2e713a2669
commit 711a3da7a6
2 changed files with 9 additions and 7 deletions

View File

@@ -10,6 +10,11 @@ in
type = lib.types.str;
description = "Bcrypt verifier for the AdGuard Home administrator password.";
};
reverseProxyAddress = lib.mkOption {
type = lib.types.str;
description = "IP address of the guest that handles internal HTTP requests.";
};
};
config = lib.mkIf cfg.enable {
@@ -204,19 +209,14 @@ in
parental_block_host = "family-block.dns.adguard.com";
safebrowsing_block_host = "standard-block.dns.adguard.com";
rewrites = [
{
domain = "*.home";
answer = "10.23.20.32";
enabled = true;
}
{
domain = "*.alexion.dev";
answer = "10.23.20.109";
answer = cfg.reverseProxyAddress;
enabled = true;
}
{
domain = "home";
answer = "10.23.20.109";
answer = cfg.reverseProxyAddress;
enabled = true;
}
];