grimm-nixos-laptop/modules/puffer.nix
2024-05-11 22:55:59 +02:00

31 lines
685 B
Nix

{ config, pkgs, ... }:
let
inherit (config.serverConfig) ports vhosts;
in
{
services.pufferpanel = {
enable = true;
environment = {
PUFFER_WEB_HOST = ":${builtins.toString vhosts.puffer_host.port}";
PUFFER_DAEMON_SFTP_HOST = ":${builtins.toString ports.puffer_sftp_port.port}";
};
extraGroups = [ "docker" ];
};
networking.firewall.allowedTCPPorts = [
25565
25566
25567
25568
7270
];
# virtualisation.podman.enable = true;
virtualisation.docker.enable = true;
environment.systemPackages = with pkgs; [
pufferpanel
(writeShellScriptBin "pufferpanel-nix" "pufferpanel --workDir /var/lib/pufferpanel $@")
];
}