From 0090b0d345b03826ecf03d5e403e87a922c67bde Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sat, 20 Jul 2024 19:02:29 -0700 Subject: [PATCH] Moved rewrite rules Domain rewrite levels are configured as part of a system's configuration instead of at the adguardhome module. --- .../nixos/services/adguardhome/default.nix | 12 ----------- systems/x86_64-linux/node/default.nix | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/modules/nixos/services/adguardhome/default.nix b/modules/nixos/services/adguardhome/default.nix index 21f55d5..850f069 100644 --- a/modules/nixos/services/adguardhome/default.nix +++ b/modules/nixos/services/adguardhome/default.nix @@ -27,18 +27,6 @@ in { mutableSettings = true; host = "0.0.0.0"; port = 3000; - settings = { - filtering.rewrites = [ - { - domain = "adguardhome.kilonull.com"; - answer = "192.168.113.13"; - } - { - domain = "*.kilonull.com"; - answer = "192.168.113.13"; - } - ]; - }; }; services.nginx = { diff --git a/systems/x86_64-linux/node/default.nix b/systems/x86_64-linux/node/default.nix index da70462..a168208 100644 --- a/systems/x86_64-linux/node/default.nix +++ b/systems/x86_64-linux/node/default.nix @@ -90,6 +90,27 @@ apps.yubikey.enable = true; }; + # Rewrite specific to this machine (didn't want to put this in my adguardhome + # module incase I want to reuse it for something else later) + services.adguardhome.settings.filtering.rewrites = [ + { + domain = "octoprint.kilonull.com"; + answer = "192.168.113.42"; + } + { + domain = "hydra.kilonull.com"; + answer = "192.168.113.69"; + } + { + domain = "cache.kilonull.com"; + answer = "192.168.113.69"; + } + { + domain = "*.kilonull.com"; + answer = "192.168.113.13"; + } + ]; + security.pam.sshAgentAuth = { enable = true; # Addresses issue 31611