Files
vps-nixos/hosts/common/optional/remnawave/panel/remnapanel/config.nix
T
aloslider c11e41669b Init
Initial commit, nodes are mostly done, panel is WIP
2026-11-16 01:01:01 +03:00

37 lines
892 B
Nix

{
config,
lib,
...
}:
with lib;
let
cfg = config.vps.remnawave;
domain = config.sops.placeholder."domain";
in
{
config = mkIf (cfg.enable && cfg.type == "panel") {
sops.secrets = {
"domain" = { };
"panel/app-secret" = { };
"panel/postgres-password" = { };
};
sops.templates."remnapanel.env" = {
mode = "0400";
content = ''
APP_PORT=3000
METRICS_PORT=3001
API_INSTANCES=1
DATABASE_URL=postgresql://postgres:${config.sops.placeholder."panel/postgres-password"}@remnawave-db:5432/postgres
REDIS_HOST=remnawave-valkey
REDIS_PORT=6379
APP_SECRET=${config.sops.placeholder."panel/app-secret"}
IS_TELEGRAM_NOTIFICATIONS_ENABLED=false
WEBHOOK_ENABLED=false
FRONT_END_DOMAIN=${cfg.subdomain}.${domain}
SUB_PUBLIC_DOMAIN=sub.${domain}
'';
};
};
}