forked from fi/nix-infra
71 lines
1.9 KiB
Nix
71 lines
1.9 KiB
Nix
{ pkgs, config, ... }:
|
|
{
|
|
services.pterodactyl-panel = {
|
|
enable = true;
|
|
package = pkgs.pterodactyl-panel_2;
|
|
hostName = "gameserver.nekover.se";
|
|
appKeyFile = "/run/secrets/appkey";
|
|
hashIdsSaltFile = "/run/secrets/hashids-salt";
|
|
initialAdmin = {
|
|
email = "admin@nekover.se";
|
|
passwordFile = "/run/secrets/initial-admin-password";
|
|
};
|
|
mail = {
|
|
driver = "smtp";
|
|
host = "mail-1.grzb.de";
|
|
port = 465;
|
|
encryption = "tls";
|
|
user = "pterodactyl@nekover.se";
|
|
passwordFile = "/run/secrets/mail-password";
|
|
from.address = "pterodactyl@nekover.se";
|
|
};
|
|
nginx = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
extraConfig = ''
|
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
|
|
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
|
real_ip_header proxy_protocol;
|
|
'';
|
|
};
|
|
};
|
|
|
|
services.pterodactyl-wings = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
tokenFile = "/run/secrets/token";
|
|
settings = {
|
|
uuid = "a345cf7e-bb7a-4b65-bce8-27d436ec3658";
|
|
token_id = "NCjstOQZX6BOmXP1";
|
|
api.port = 4443;
|
|
};
|
|
};
|
|
|
|
sops.secrets."appkey" = {
|
|
mode = "0440";
|
|
owner = config.services.pterodactyl-panel.user;
|
|
group = config.services.pterodactyl-panel.group;
|
|
};
|
|
sops.secrets."hashids-salt" = {
|
|
mode = "0440";
|
|
owner = config.services.pterodactyl-panel.user;
|
|
group = config.services.pterodactyl-panel.group;
|
|
};
|
|
sops.secrets."initial-admin-password" = {
|
|
mode = "0440";
|
|
owner = config.services.pterodactyl-panel.user;
|
|
group = config.services.pterodactyl-panel.group;
|
|
};
|
|
sops.secrets."mail-password" = {
|
|
mode = "0440";
|
|
owner = config.services.pterodactyl-panel.user;
|
|
group = config.services.pterodactyl-panel.group;
|
|
};
|
|
sops.secrets."token" = {
|
|
mode = "0440";
|
|
owner = "root";
|
|
group = "root";
|
|
};
|
|
}
|