Add Jupiter to mycelium

This commit is contained in:
Bun 2025-05-30 00:42:55 -04:00
parent 3bf365966c
commit 6a2fd78220
8 changed files with 50 additions and 10 deletions

View file

@ -1,6 +1,7 @@
{ config, ... }: { config, ... }:
{ {
fileSystems = with config.services.mycelium.ips; { fileSystems = with config.services.mycelium.ips; {
# Local mounts
"/persist/storage" = { "/persist/storage" = {
device = "/dev/disk/by-uuid/d0d6783f-ad51-4d85-b8a9-3374f6460ef6"; device = "/dev/disk/by-uuid/d0d6783f-ad51-4d85-b8a9-3374f6460ef6";
fsType = "btrfs"; fsType = "btrfs";

View file

@ -1,11 +1,43 @@
{ config, ... }: { config, ... }:
{ {
fileSystems."/mnt/Games" = { fileSystems = {
device = "/dev/disk/by-uuid/cb109a85-846d-4417-9c50-a2279bd20803"; # Local mounts
fsType = "btrfs"; "/mnt/Games" = {
options = [ device = "/dev/disk/by-uuid/cb109a85-846d-4417-9c50-a2279bd20803";
"nofail" fsType = "btrfs";
"nosuid" options = [
]; "nofail"
"nosuid"
];
};
# Network mounts
"/home/${config.sysusers.main}/Network/Midas" = {
device = "[${midas}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${config.sysusers.main}/Network/Kitty" = {
device = "[${kitty}]:/storage/bun";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
"/home/${config.sysusers.main}/Network/Prophet" = {
device = "[${prophet}]:/storage";
fsType = "nfs4";
options = [
"noauto"
"soft"
"x-systemd.automount"
];
};
}; };
} }

View file

@ -7,6 +7,7 @@
matchBlocks = { matchBlocks = {
# Personal servers # Personal servers
tower.hostname = "577:84d1:b682:9ac3:b987:b78e:33d9:2060"; tower.hostname = "577:84d1:b682:9ac3:b987:b78e:33d9:2060";
jupiter.hostname = "5ce:969c:40d1:9575:f5e:591d:c377:a20b";
midas.hostname = "538:e163:87ba:f847:3646:18b6:6b01:d8f8"; midas.hostname = "538:e163:87ba:f847:3646:18b6:6b01:d8f8";
kitty.hostname = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868"; kitty.hostname = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868";
prophet.hostname = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b"; prophet.hostname = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";

View file

@ -17,4 +17,9 @@
enable = config.networking.useNetworkd; enable = config.networking.useNetworkd;
dnsovertls = "true"; dnsovertls = "true";
}; };
systemd = {
services.NetworkManager-wait-online.enable = false;
network.wait-online.enable = false;
};
} }

View file

@ -6,6 +6,7 @@
config.services.mycelium.ips = { config.services.mycelium.ips = {
tower = "577:84d1:b682:9ac3:b987:b78e:33d9:2060"; tower = "577:84d1:b682:9ac3:b987:b78e:33d9:2060";
jupiter = "5ce:969c:40d1:9575:f5e:591d:c377:a20b";
midas = "538:e163:87ba:f847:3646:18b6:6b01:d8f8"; midas = "538:e163:87ba:f847:3646:18b6:6b01:d8f8";
kitty = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868"; kitty = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868";
prophet = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b"; prophet = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";

View file

@ -5,7 +5,7 @@
config = lib.mkIf config.services.nfs.server.enable { config = lib.mkIf config.services.nfs.server.enable {
services.nfs.server.exports = "/storage *(rw)"; services.nfs.server.exports = "/storage *(rw)";
networking.firewall.extraInputRules = with config.services.mycelium.ips; '' networking.firewall.extraInputRules = with config.services.mycelium.ips; ''
ip6 saddr { ${tower}, ${midas}, ${kitty}, ${prophet} } tcp dport 2049 accept ip6 saddr { ${tower}, ${jupiter}, ${midas}, ${kitty}, ${prophet} } tcp dport 2049 accept
''; '';
}; };
} }

View file

@ -24,7 +24,7 @@
''; '';
}; };
networking.firewall.extraInputRules = with config.services.mycelium.ips; '' networking.firewall.extraInputRules = with config.services.mycelium.ips; ''
ip6 saddr ${tower} tcp dport 1935 accept ip6 saddr { ${tower}, ${jupiter} } tcp dport 1935 accept
ip saddr { ${config.secrets.ips.luna}, ${config.secrets.ips.corn} } tcp dport 1935 accept ip saddr { ${config.secrets.ips.luna}, ${config.secrets.ips.corn} } tcp dport 1935 accept
''; '';
systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www/landing-page/streams/hls/" ]; systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www/landing-page/streams/hls/" ];

View file

@ -8,7 +8,7 @@
rtmp-port = 1945; rtmp-port = 1945;
}; };
networking.firewall.extraInputRules = with config.services.mycelium.ips; '' networking.firewall.extraInputRules = with config.services.mycelium.ips; ''
ip6 saddr ${tower} tcp dport 1935 accept ip6 saddr { ${tower}, ${jupiter} } tcp dport 1935 accept
''; '';
environment.persistence."/persist".directories = [ "/var/lib/owncast" ]; environment.persistence."/persist".directories = [ "/var/lib/owncast" ];
}; };