# Auto-generated by compose2nix. { pkgs, lib, config, ... }: { # Runtime virtualisation.podman = { enable = true; autoPrune.enable = true; dockerCompat = true; }; # Enable container name DNS for all Podman networks. networking.firewall.interfaces = let matchAll = if !config.networking.nftables.enable then "podman+" else "podman*"; in { "${matchAll}".allowedUDPPorts = [ 53 ]; }; virtualisation.oci-containers.backend = "podman"; # Containers virtualisation.oci-containers.containers."remnawave-panel-1" = { image = "localhost/compose2nix/remnawave-panel-1"; environment = { "API_INSTANCES" = "1"; "APP_PORT" = "3000"; "BANDWIDTH_USAGE_NOTIFICATIONS_ENABLED" = "false"; "BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD" = "[60, 80]"; "CLOUDFLARE_TOKEN" = "ey..."; "DATABASE_URL" = "postgresql://remnawave:remnawave@remnawave-db:5432/postgres"; "FRONT_END_DOMAIN" = "*"; "IS_DOCS_ENABLED" = "false"; "IS_TELEGRAM_NOTIFICATIONS_ENABLED" = "false"; "JWT_API_TOKENS_SECRET" = "787aa44c10130a9fa17ea3ea50c1248dd3e868f74941b96c09d608051399f88b95b67cd68d045aa39658b4b3fe933bf2b2c1437522498976f39f85ae1eab40da"; "JWT_AUTH_SECRET" = "2bc14bacb6b82ce9e3ef69f8dd7bfb6b8a531f4f516902735d1d8f1bac8ff9b5077398f95b942b1adafc0ca1da4cdfd24a18539fa6eb26bee3f597a45deac94a"; "METRICS_PASS" = "admin"; "METRICS_PORT" = "3001"; "METRICS_USER" = "admin"; "NOT_CONNECTED_USERS_NOTIFICATIONS_AFTER_HOURS" = "[6, 24, 48]"; "NOT_CONNECTED_USERS_NOTIFICATIONS_ENABLED" = "false"; "PANEL_DOMAIN" = "rw.zeroq.ru"; "POSTGRES_DB" = "remnawave"; "POSTGRES_PASSWORD" = "gQLqOm2jK/Z1oBXCD18XSgr76M8ZqkVhHZbNKvZQXnY="; "POSTGRES_USER" = "remnawave"; "REDIS_SOCKET" = "/var/run/valkey/valkey.sock"; "SCALAR_PATH" = "/scalar"; "SUB_PUBLIC_DOMAIN" = "rw.zeroq.ru/api/sub"; "SWAGGER_PATH" = "/docs"; # "TELEGRAM_BOT_TOKEN" = "change_me"; # "TELEGRAM_NOTIFY_CRM" = "change_me"; # "TELEGRAM_NOTIFY_NODES" = "change_me"; # "TELEGRAM_NOTIFY_SERVICE" = "change_me"; # "TELEGRAM_NOTIFY_TBLOCKER" = "change_me"; # "TELEGRAM_NOTIFY_USERS" = "change_me"; "WEBHOOK_ENABLED" = "false"; "WEBHOOK_SECRET_HEADER" = "vsmu67Kmg6R8FjIOF1WUY8LWBHie4scdEqrfsKmyf4IAf8dY3nFS0wwYHkhh6ZvQ"; "WEBHOOK_URL" = "https://your-webhook-url.com/endpoint"; }; ports = [ "3003:3003/tcp" ]; log-driver = "journald"; extraOptions = [ "--network-alias=remnawave-panel-1" "--network=remnawavebackend_default" ]; }; systemd.services."podman-remnawave-panel-1" = { serviceConfig = { Restart = lib.mkOverride 90 "always"; }; partOf = [ "podman-compose-remnawave-root.target" ]; wantedBy = [ "podman-compose-remnawave-root.target" ]; }; # Builds systemd.services."podman-build-remnawave-panel-1" = { path = [ pkgs.podman pkgs.git ]; serviceConfig = { Type = "oneshot"; TimeoutSec = 300; }; script = '' cd /mnt/s/Deploy/remnawave-backend podman build -t compose2nix/remnawave-panel-1 . ''; }; # Root service # When started, this will automatically create all resources and start # the containers. When stopped, this will teardown all resources. systemd.targets."podman-compose-remnawave-root" = { unitConfig = { Description = "Root target generated by compose2nix."; }; wantedBy = [ "multi-user.target" ]; }; }