grimm-nix-server/modules/puffer.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, config, inputs, pkgs, ... }:
let
root_host = "grimmauld.de";
puffer_port = 8080;
puffer_sftp_port = 5657;
puffer_host = "puffer.${root_host}";
2024-01-28 23:17:54 +01:00
tlemap_host = "tlemap.${root_host}";
tlemap_port = 8100;
in {
services.pufferpanel = {
enable = true;
environment = {
PUFFER_WEB_HOST = ":${builtins.toString puffer_port}";
PUFFER_DAEMON_SFTP_HOST = ":${builtins.toString puffer_sftp_port}";
};
2023-12-31 09:57:22 +01:00
extraPackages = with pkgs; [];
extraGroups = [ "docker" ];
};
services.nginx = {
enable = true;
virtualHosts."${puffer_host}" = {
serverName = puffer_host;
forceSSL = true;
useACMEHost = root_host;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString puffer_port}";
};
};
2024-01-28 23:17:54 +01:00
virtualHosts."${tlemap_host}" = {
serverName = tlemap_host;
forceSSL = true;
useACMEHost = root_host;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString tlemap_port}";
};
};
};
2024-01-28 23:17:54 +01:00
security.acme.certs."${root_host}".extraDomainNames = [ puffer_host tlemap_host ];
2024-01-28 10:34:03 +01:00
networking.firewall.allowedTCPPorts = [ puffer_sftp_port 25565 25566 25567 25568];
2023-12-31 09:57:22 +01:00
# virtualisation.podman.enable = true;
virtualisation.docker.enable = true;
}