aboutsummaryrefslogtreecommitdiff
path: root/modules/network/default.nix
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-06-14 16:40:48 +0530
committerAkshay Nair <phenax5@gmail.com>2025-06-14 16:40:48 +0530
commit42df69164dbc74e5ddb54f5a7a01fd66260fef57 (patch)
treebc8b19c39df9edf16ca6827005b3d5e1ef564764 /modules/network/default.nix
parent58519ea7b12e8ad58c0f97d9636d30572a789b41 (diff)
downloadhomeserver-nixos-config-42df69164dbc74e5ddb54f5a7a01fd66260fef57.tar.gz
homeserver-nixos-config-42df69164dbc74e5ddb54f5a7a01fd66260fef57.zip
Switch to coredns + refactor dns hosts mapping into service + more refactor
Diffstat (limited to '')
-rw-r--r--modules/network/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/network/default.nix b/modules/network/default.nix
index 290c291..78fac75 100644
--- a/modules/network/default.nix
+++ b/modules/network/default.nix
@@ -8,9 +8,15 @@ in
imports = [
./wireless.nix
./ssh.nix
- ./service-router.service.nix
+ ../../services/service-router.service.nix
+ ../../services/bacchus-dns.service.nix
];
+ networking = {
+ hostName = "bacchus";
+ firewall.enable = true;
+ };
+
services.service-router = {
enable = true;
routes = {
@@ -23,12 +29,15 @@ in
"syncthing.local" = { inherit host; port = ports.syncthing; };
"lidarr.local" = { inherit host; port = ports.lidarr; };
"ntfy.local" = { inherit host; port = ports.ntfy; };
- "grafana.local" = { inherit host; port = ports.grafana; extraOptions.recommendedProxySettings = true; };
+ "grafana.local" = { inherit host; port = ports.grafana; extraNginxOptions.recommendedProxySettings = true; };
};
};
- networking = {
- hostName = "bacchus";
- firewall.enable = true;
+ # Host mappings defined by service-router
+ services.bacchus-dns = {
+ enable = true;
+ port = 53;
+ openFirewall = true;
+ fallback = [ "1.1.1.1" "8.8.8.8" ];
};
}