diff --git a/webapp.nix b/webapp.nix index 1e09d1c..87e220c 100644 --- a/webapp.nix +++ b/webapp.nix @@ -60,6 +60,22 @@ let # Demo Mode VITE_DEMO_MODE = if cfg.demoMode then "true" else "false"; + # Hub → standalone navigation URLs. + # The chakra tiles in src/pages/Hub.vue build from these. With + # path-mode deployment, set these to canonical trailing-slash URLs: + # hubMarketUrl = "https://demo.example.com/market/"; + # With subdomain deployment: + # hubMarketUrl = "https://market.example.com"; + # When unset (empty string), the corresponding chakra renders ghosted + # (non-link) — useful for hosts that don't deploy a given module. + VITE_HUB_ACTIVITIES_URL = cfg.hubActivitiesUrl; + VITE_HUB_CASTLE_URL = cfg.hubCastleUrl; + VITE_HUB_WALLET_URL = cfg.hubWalletUrl; + VITE_HUB_CHAT_URL = cfg.hubChatUrl; + VITE_HUB_FORUM_URL = cfg.hubForumUrl; + VITE_HUB_MARKET_URL = cfg.hubMarketUrl; + VITE_HUB_TASKS_URL = cfg.hubTasksUrl; + # Additional env vars NODE_ENV = "production"; @@ -217,6 +233,53 @@ in { description = "Enable demo mode with auto-generated demo accounts on the login page"; }; + # Hub → standalone navigation URLs (one per chakra tile). + # Empty string = tile rendered ghosted (no link). Set per-host based on + # whether each standalone is deployed and on the deployment shape + # (path-mode → trailing slash recommended; subdomain-mode → no path). + hubActivitiesUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/sortir/"; + description = "URL the chakra hub's Activities tile links to"; + }; + hubCastleUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/castle/"; + description = "URL the chakra hub's Castle tile links to"; + }; + hubWalletUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/wallet/"; + description = "URL the chakra hub's Wallet tile links to"; + }; + hubChatUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/chat/"; + description = "URL the chakra hub's Chat tile links to"; + }; + hubForumUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/forum/"; + description = "URL the chakra hub's Forum tile links to"; + }; + hubMarketUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/market/"; + description = "URL the chakra hub's Market tile links to"; + }; + hubTasksUrl = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://demo.example.com/tasks/"; + description = "URL the chakra hub's Tasks tile links to"; + }; + enableSSL = lib.mkOption { type = lib.types.bool; default = true;