Switching to .lan from .local to prevent mDNS issues

This commit is contained in:
Random936
2026-04-24 20:10:17 -04:00
parent 75d6d62271
commit 76e69f0bc8
5 changed files with 21 additions and 19 deletions

View File

@@ -54,7 +54,7 @@
enable = true; enable = true;
virtualHosts = { virtualHosts = {
# Jellyfin # Jellyfin
"mindforge.randomctf.local" = { "mindforge.randomctf.lan" = {
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.mindforge.log; access_log /var/log/nginx/access.mindforge.log;
''; '';

View File

@@ -23,7 +23,7 @@
settings.server = { settings.server = {
http_addr = "127.0.0.1"; http_addr = "127.0.0.1";
http_port = 3000; http_port = 3000;
domain = "grafana.randomctf.local"; domain = "grafana.randomctf.lan";
}; };
}; };
@@ -31,19 +31,19 @@
enable = true; enable = true;
virtualHosts = { virtualHosts = {
# Grafana # Grafana
"grafana.randomctf.local" = { "grafana.randomctf.lan" = {
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.grafana.log; access_log /var/log/nginx/access.grafana.log;
''; '';
locations."/".extraConfig = '' locations."/".extraConfig = ''
proxy_set_header Host grafana.randomctf.local; proxy_set_header Host grafana.randomctf.lan;
proxy_pass http://localhost:3000/; proxy_pass http://localhost:3000/;
''; '';
}; };
# Prometheus # Prometheus
"prometheus.randomctf.local" = { "prometheus.randomctf.lan" = {
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.prometheus.log; access_log /var/log/nginx/access.prometheus.log;
''; '';

View File

@@ -1,28 +1,30 @@
{ ip_address, hostname, open_ports, lib }: let { ip_address, hostname, open_ports, lib, }: let
gateway_ip = "192.168.100.1"; gateway_ip = "192.168.100.1";
in { in {
# Configure hostname. # Configure hostname.
networking.hostName = hostname; networking.hostName = hostname;
# Bug fix
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
# DNS config
networking.nameservers = [ gateway_ip ];
# Allowed Ports
networking.firewall.allowedTCPPorts = open_ports;
# Conigure a static IP address. # Conigure a static IP address.
networking.useDHCP = false; networking.useDHCP = false;
networking.useNetworkd = true; networking.useNetworkd = true;
networking.enableIPv6 = false; networking.enableIPv6 = false;
# Bug fix
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
networking.defaultGateway = {
address = gateway_ip;
interface = "enp6s18";
};
networking.nameservers = [ gateway_ip ];
networking.firewall.allowedTCPPorts = open_ports;
networking.interfaces.enp6s18.ipv4.addresses = [ networking.interfaces.enp6s18.ipv4.addresses = [
{ {
address = ip_address; address = ip_address;
prefixLength = 24; prefixLength = 24;
} }
]; ];
networking.defaultGateway = {
address = gateway_ip;
interface = "enp6s18";
};
} }

View File

@@ -48,7 +48,7 @@
r330-media = "ssh media@192.168.100.40"; r330-media = "ssh media@192.168.100.40";
r330-logging = "ssh logging@192.168.100.41"; r330-logging = "ssh logging@192.168.100.41";
mnemosyne = "ssh mnemosyne@192.168.100.42"; mnemosyne = "ssh mnemosyne@192.168.100.42";
mindforge = "ssh mindforge@mindforge.randomctf.local"; mindforge = "ssh mindforge@mindforge.randomctf.lan";
# Nix Specific aliases # Nix Specific aliases
update-config = "sudo nixos-rebuild switch --flake ~/dotfiles"; update-config = "sudo nixos-rebuild switch --flake ~/dotfiles";