aboutsummaryrefslogtreecommitdiff
path: root/hosts/ganymede
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/ganymede')
-rw-r--r--hosts/ganymede/caddy.nix33
-rw-r--r--hosts/ganymede/config.nix40
-rw-r--r--hosts/ganymede/nixos.nix3
-rw-r--r--hosts/ganymede/wireguard.nix22
4 files changed, 32 insertions, 66 deletions
diff --git a/hosts/ganymede/caddy.nix b/hosts/ganymede/caddy.nix
index 3a805f4..08a779b 100644
--- a/hosts/ganymede/caddy.nix
+++ b/hosts/ganymede/caddy.nix
@@ -9,7 +9,7 @@
"github.com/tailscale/caddy-tailscale@v0.0.0-20251204171825-f070d146dd61"
"github.com/caddy-dns/porkbun@v0.3.1"
];
- hash = "sha256-FrAI7Fpz3bXclmKcizBMv/VI1hTAWT6DQnj7S09MwNY=";
+ hash = "sha256-3BRyQ/fqPUemW1KqwyvkO1LeZB7PyBMIL/5a2u1mqqU=";
});
globalConfig = ''
@@ -19,22 +19,25 @@
}
'';
- virtualHosts."lindsey.williamsfam.us.com".extraConfig = ''
- redir https://williams-ryan-lindsey.blogspot.com permanent
- '';
+ virtualHosts = {
+ "lindsey.williamsfam.us.com".extraConfig = ''
+ redir https://williams-ryan-lindsey.blogspot.com permanent
+ '';
- virtualHosts."daniel.williamsfam.us.com".extraConfig = ''
- root * /media/public/www/daniel
- file_server
- '';
+ "daniel.williamsfam.us.com".extraConfig = ''
+ root * /media/public/www/daniel
+ file_server
+ '';
- # virtualHosts."collin.williamsfam.us.com".extraConfig = ''
- # root * /med
- # '';
+ "williamsfam.us.com".extraConfig = ''
+ root * /media/public/www/root
+ file_server
+ '';
+ };
+ };
- virtualHosts."williamsfam.us.com".extraConfig = ''
- root * /media/public/www/root
- file_server
- '';
+ collinux.services.glance.homelabServices."website" = {
+ url = "https://williamsfam.us.com";
+ icon = "mdi:web";
};
}
diff --git a/hosts/ganymede/config.nix b/hosts/ganymede/config.nix
index 0858106..ed397ef 100644
--- a/hosts/ganymede/config.nix
+++ b/hosts/ganymede/config.nix
@@ -29,6 +29,7 @@
};
system.network = {
+ dns.areYouAServer = true;
static = {
ip = "192.168.50.2/24";
gateway = "192.168.50.1";
@@ -41,58 +42,35 @@
};
services = {
- sshd = {
- enable = true;
- public = true;
-
- conf.rootLogin = true;
- };
-
- minecraft = {
- enable = true;
- port = 19132; # standard
- public = true;
- };
-
- ngircd = {
- enable = true;
- port = 6667; # standard
- public = true;
- };
+ sshd.enable = true; # :22
+ minecraft.enable = true; # :19132
+ ngircd.enable = true; # :6667
jta = {
enable = true;
port = 8072;
- publicUrl = "jta.williamsfam.us.com";
- };
- ganyupload = {
- enable = true;
- port = 8073;
- publicUrl = "upld.williamsfam.us.com";
};
goaccess = {
enable = true;
port = 7890;
- privateUrl = "stats.ganymede";
};
btopweb = {
enable = true;
port = 8017;
- privateUrl = "btop.ganymede";
};
qbittorrent = {
enable = true;
port = 8076;
- privateUrl = "bittorrent.ganymede";
- };
- cgit = {
- enable = true;
- privateUrl = "git.ganymede";
};
+ cgit.enable = true;
glance = {
enable = true;
port = 8081;
};
+ filebrowser = {
+ enable = true;
+ port = 8082;
+ };
caddy = {
enable = true;
diff --git a/hosts/ganymede/nixos.nix b/hosts/ganymede/nixos.nix
index d913df7..873cd2f 100644
--- a/hosts/ganymede/nixos.nix
+++ b/hosts/ganymede/nixos.nix
@@ -28,7 +28,4 @@
services.caddy.virtualHosts."jta.williamsfam.us.com".logFormat = lib.mkForce ''
output file /var/log/caddy/access-williamsfam.us.com.log
'';
-
- # i broke something and this fixes it
- environment.etc."systemd/resolved.conf.d/10-dns.conf".text = config.environment.etc."systemd/resolved.conf".text;
}
diff --git a/hosts/ganymede/wireguard.nix b/hosts/ganymede/wireguard.nix
index a1be5f7..de7afb5 100644
--- a/hosts/ganymede/wireguard.nix
+++ b/hosts/ganymede/wireguard.nix
@@ -6,19 +6,13 @@
}: {
environment.systemPackages = [pkgs.wireguard-tools];
- services.dnsmasq = {
- enable = true;
- settings = {
- port = 5353;
- local = "/ganymede/";
- address = "/.ganymede/10.100.0.1";
- listen-address = ["127.0.0.1" "10.100.0.1"];
- };
- };
-
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
- networking.firewall.allowedUDPPorts = [51820 5353];
+ networking.firewall = {
+ allowedUDPPorts = [51820];
+ trustedInterfaces = ["wg0"]; # bypass firewall inside wireguard
+ };
+
systemd.network.netdevs."50-wg0" = {
netdevConfig = {
Kind = "wireguard";
@@ -43,15 +37,9 @@
systemd.network.networks."wg0" = {
matchConfig.Name = "wg0";
address = ["${hosts.ganymede.wg_ip}/24"];
- dns = ["127.0.0.1:5353"];
- domains = ["~ganymede"];
networkConfig = {
IPMasquerade = "ipv4";
IPv4Forwarding = true;
};
- extraConfig = ''
- DNSOverTLS=no
- DNSSEC=no
- '';
};
}