Files
vps-nixos/hosts/common/optional/remnawave/panel/remnapanel/config.nix
T
aloslider 67b1571e28 Init
Initial commit, nodes are mostly done, panel is WIP
2026-11-17 10:47:39 +03:00

42 lines
1.2 KiB
Nix

{
config,
lib,
...
}:
with lib;
let
rootCfg = config.vps.remnawave;
moduleCfg = rootCfg.panel;
domain = config.sops.placeholder."domain";
in
{
config = mkIf (rootCfg.enable && rootCfg.type == "panel") {
sops.secrets = {
"domain" = { };
"panel/app-secret" = { };
"panel/postgres-password" = { };
"panel/metrics/user" = { };
"panel/metrics/password" = { };
};
sops.templates."remnapanel.env".content = ''
APP_PORT=${toString moduleCfg.appPort}
METRICS_USER=${config.sops.placeholder."panel/metrics/user"}
METRICS_PASS=${config.sops.placeholder."panel/metrics/password"}
METRICS_PORT=${toString moduleCfg.metricsPort}
API_INSTANCES=1
DATABASE_URL=postgresql://postgres:${
config.sops.placeholder."panel/postgres-password"
}@remnawave-db:5432/postgres
REDIS_HOST=remnawave-valkey
REDIS_PORT=${toString moduleCfg.redis.port}
APP_SECRET=${config.sops.placeholder."panel/app-secret"}
IS_TELEGRAM_NOTIFICATIONS_ENABLED=false
WEBHOOK_ENABLED=false
PANEL_DOMAIN=${moduleCfg.subdomain}.${domain}
FRONT_END_DOMAIN=${moduleCfg.subdomain}.${domain}
SUB_PUBLIC_DOMAIN=sub.${domain}
'';
};
}