aboutsummaryrefslogtreecommitdiff
path: root/modules/common
diff options
context:
space:
mode:
authoraethrvmn <me@aethrvmn.gr>2025-08-31 20:00:16 +0000
committeraethrvmn <me@aethrvmn.gr>2025-08-31 20:00:16 +0000
commitd2a01fe0fea66f852320e4a5ec69d3798371c686 (patch)
tree737a5f315ba7671952f1f636c551811c812d1bf4 /modules/common
parentcleaned up waybar (diff)
moved searx and adguard to common modules
it makes no sense in a declerative config why one should run a central service; it would require to mess with vps, etc. Instead all of these are in sync by git anyways so it's far better for each device to run their own searx instance and do their own adguard monitoring
Diffstat (limited to '')
-rw-r--r--modules/common/adguard/default.nix84
-rw-r--r--modules/common/searx/default.nix2
2 files changed, 29 insertions, 57 deletions
diff --git a/modules/common/adguard/default.nix b/modules/common/adguard/default.nix
index 9929bc1..3d74029 100644
--- a/modules/common/adguard/default.nix
+++ b/modules/common/adguard/default.nix
@@ -2,7 +2,7 @@
{
services = {
adguardhome = {
- enable = false;
+ enable = true;
openFirewall = false;
mutableSettings = false;
@@ -12,7 +12,7 @@
};
dns = {
- bind_hosts = [ "10.0.0.5" "127.0.0.1" ];
+ bind_hosts = [ "127.0.0.1" ];
port = 53;
upstream_dns = [
@@ -31,76 +31,48 @@
filtering = {
rewrites = [
- # jellyfin
- {
- domain = "media.internal";
- answer = "10.0.0.5";
- }
- # immich
- {
- domain = "photos.internal";
- answer = "10.0.0.5";
- }
- # calibre-web
- {
- domain = "library.internal";
- answer = "10.0.0.5";
- }
# searxng
{
domain = "search.internal";
- answer = "10.0.0.5";
- }
- # ollama api
- {
- domain = "ollama.internal";
- answer = "10.0.0.5";
- }
- # open-webui
- {
- domain = "chat.internal";
- answer = "10.0.0.5";
- }
- # forgejo
- {
- domain = "forge.internal";
- answer = "10.0.0.5";
+ answer = "127.0.0.1";
}
- # cgit
- {
- domain = "code.internal";
- answer = "10.0.0.5";
- }
# adguard
{
domain = "dns.internal";
- answer = "10.0.0.5";
+ answer = "127.0.0.1";
}
- # grafana
- {
- domain = "monitor.internal";
- answer = "10.0.0.5";
- }
];
};
};
};
- nginx.virtualHosts = {
- "dns.internal" = {
- locations."/" = {
- proxyPass = "http://127.0.0.1:3000";
- proxyWebsockets = true;
+ nginx ={
+ enable = true;
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+
+ virtualHosts = {
+ "dns.internal" = {
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:3000";
+ proxyWebsockets = true;
+ };
};
};
};
};
- # networking = {
- # nameservers = [
- # "9.9.9.9"
- # "127.0.0.1"
- # "10.0.0.5"
- # ];
- # };
+ networking = {
+ nameservers = [
+ "127.0.0.1"
+ ];
+
+ hosts = {
+ "127.0.0.1" = [
+ "dns.internal"
+ "search.internal"
+ ];
+ };
+ };
}
diff --git a/modules/common/searx/default.nix b/modules/common/searx/default.nix
index 659c700..d90caa8 100644
--- a/modules/common/searx/default.nix
+++ b/modules/common/searx/default.nix
@@ -14,7 +14,7 @@
general = {
debug = false;
- instance_name = "SearXNG Instance";
+ instance_name = "SearXNG";
donation_url = false;
contact_url = false;
privacypolicy_url = false;
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.