cleanup + minecraft changes

This commit is contained in:
2024-11-25 01:18:07 -05:00
parent f3c2ae4904
commit 6a2a477eda
4 changed files with 49 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
config,
service_configs,
username,
pkgs,
...
}:
{
@@ -34,19 +35,27 @@
'';
"bitmagnet.${service_configs.https.domain}".extraConfig = ''
tls internal
# tls internal
${import ../secrets/caddy_auth.nix}
reverse_proxy ${service_configs.https.wg_ip}:${builtins.toString service_configs.ports.bitmagnet}
'';
"torrent.${service_configs.https.domain}".extraConfig = ''
tls internal
# tls internal
${import ../secrets/caddy_auth.nix}
reverse_proxy ${service_configs.https.wg_ip}:${builtins.toString service_configs.ports.torrent}
'';
"map.${service_configs.https.domain}".extraConfig = ''
# tls internal
root * ${service_configs.minecraft.parent_dir}/${service_configs.minecraft.server_name}/squaremap/web
file_server browse
'';
};
};
systemd.packages = with pkgs; [ nssTools ];
networking.firewall.allowedTCPPorts = [
service_configs.ports.https
80
@@ -56,6 +65,10 @@
service_configs.ports.https
];
users.users.${config.services.caddy.user}.extraGroups = [
"minecraft"
];
users.users.${username}.extraGroups = [
config.services.caddy.group
];