Adds back `services.webapp.appName` (briefly removed in the previous
commit per #100's strict policy) so existing hosts keep working
without authoring full per-host brand kits.
Resolution order:
1. If brandDir is set, use it (full brand kit wins).
2. Else synthesize: take the flake's default logo + a brand.json
carrying appName as both name and shortName.
This is NOT a VITE_APP_NAME env shim — it threads through the brand
kit pipeline properly (brand.json read by vite-branding.ts). Hosts
that need themed chrome / their own logo upgrade to a real brandDir.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drops the local stdenv.mkDerivation + fetchPnpmDeps in favor of
calling the webapp flake's own lib.mkWebapp (added in
aiolabs/webapp#97). The hub build now runs through the same
builder as the per-standalone builds in server-deploy, which means
ONE pnpmDepsHash lives in webapp's flake.nix and no other repo
carries one.
Options changed:
- ADDED flake (required): the webapp flake input. Server-deploy
hosts pin this to inputs.webapp (main) or inputs.webapp-dev
(staging channel).
- ADDED brandDir: path to the brand kit. Defaults to the flake's
committed aiolabs default. Override for per-host branding (logo,
manifest name, theme colors).
- REMOVED src: replaced by flake (which carries the source).
- REMOVED gitUrl, gitRef: replaced by flake input ref selection.
- REMOVED pnpmDepsHash: managed inside webapp's flake.nix now.
- REMOVED appName: per #99/#100's strict policy, VITE_APP_NAME is
brand-controlled. Custom names flow through brandDir + brand.json,
not env vars. Hosts that today set appName must either accept the
default brand's name or supply a per-host brandDir.
Other options (nostrRelays, lnbitsBaseUrl, hubXUrl, …) flow into
the build via lib.mkWebapp's extraEnv.
nginx root moves from \$out/share/webapp to \$out/dist (lib.mkWebapp's
output layout).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The activities module in webapp was renamed to events
(aiolabs/webapp#94). The corresponding hub-URL option here is the env
that drives src/pages/Hub.vue's "Events" chakra tile. Renames:
- Option: `hubActivitiesUrl` → `hubEventsUrl`
- Env passed to vite: `VITE_HUB_ACTIVITIES_URL` → `VITE_HUB_EVENTS_URL`
- Example URL: `/sortir/` → `/events/`
No backwards compatibility shim — hosts using `services.webapp
.hubActivitiesUrl = "…"` will need to switch to `hubEventsUrl` in the
same change as their flake-input bump.
Coordinated downstream:
- aiolabs/server-deploy: standalones.nix `hubUrlOption` maps
`events → "hubEventsUrl"` (no more "historical naming" comment).
- aiolabs/webapp PR #94: `VITE_HUB_EVENTS_URL` consumed by
`src/pages/Hub.vue` and documented in `.env.example`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hashed assets stay immutable via the existing regex location; the SPA
shell (index.html, served via tryFiles fallback for /, deep links, and
literal /index.html) now revalidates on every load so new deploys are
picked up without browsers holding a stale shell that references
deleted hashed assets. no-cache = cache + revalidate (304), not
"don't store" — bandwidth cost is a single conditional request per
page load.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New services.webapp.lnbitsNostrTransportPubkey threads through as
VITE_LNBITS_NOSTR_TRANSPORT_PUBKEY at build time. Empty default
keeps existing hosts unaffected; set per-host to opt into addressing
the lnbits backend over Nostr (NIP-44 v2 kind-21000 RPC) instead of
plain HTTP.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nixpkgs deprecated pkgs.pnpm.{fetchDeps,configHook} in favor of the
top-level pkgs.fetchPnpmDeps and pkgs.pnpmConfigHook. fetchPnpmDeps now
requires fetcherVersion to be set; 2 is correct for pnpm v9+ lockfiles.
Webapp now uses pnpm (aiolabs/webapp#61); fetch deps from pnpm-lock.yaml
instead of package-lock.json.
- Replace buildNpmPackage with stdenv.mkDerivation + pnpm.fetchDeps
- Rename npmDepsHash option to pnpmDepsHash
- Drop npmFlags and makeCacheWritable (handled by pnpm.configHook)
Consumers must update their pnpmDepsHash. Set to lib.fakeHash on first
build to get the correct hash.
Mirror of the existing hub{Activities,Libra,Wallet,Chat,Forum,Market,
Tasks}Url options for the restaurant chakra tile. Empty default
keeps existing hosts ghosted; populate via the auto-derivation in
server-deploy's webapp-standalones module when restaurant.enable is
true.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
VITE_API_KEY was only consumed by hasApiConfig() in src/lib/config and
by the activities standalone (which is built without VITE_API_KEY
anyway, so apiKey ended up an empty string downstream). Nothing in the
main webapp uses it to authenticate any request.
Removing the option is a breaking change for any downstream that sets
it, but server-deploy was the only consumer and has already been
updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Matches the upstream webapp source rebrand (castle-app → libra-app,
commit 442a755 in aiolabs/webapp). The chakra hub now reads
VITE_HUB_LIBRA_URL instead of VITE_HUB_CASTLE_URL, so the option that
sets it is renamed accordingly.
Servers consuming this module need to update their NixOS configs:
services.webapp.hubCastleUrl → services.webapp.hubLibraUrl
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The webapp's chakra hub page (src/pages/Hub.vue) reads
VITE_HUB_<NAME>_URL at runtime to decide where each module tile
points. Without these env vars set, hubLink() returns null and
every chakra tile renders ghosted (non-link), which makes the hub
look broken on first visit.
Adds 7 new options on services.webapp:
hubActivitiesUrl, hubCastleUrl, hubWalletUrl, hubChatUrl,
hubForumUrl, hubMarketUrl, hubTasksUrl
Each maps 1:1 to VITE_HUB_<NAME>_URL during the buildNpmPackage
build phase. All default to "" which preserves the
ghosted-when-unset behaviour for hosts that don't deploy a given
module.
Per-host usage:
services.webapp = {
enable = true;
hubMarketUrl = "https://demo.${domain}/market/";
hubChatUrl = "https://demo.${domain}/chat/";
hubWalletUrl = "https://demo.${domain}/wallet/";
hubForumUrl = "https://demo.${domain}/forum/";
hubTasksUrl = "https://demo.${domain}/tasks/";
hubActivitiesUrl = "https://demo.${domain}/sortir/";
hubCastleUrl = "https://demo.${domain}/castle/";
...
};
Trailing-slash convention is recommended under path-mode deployment
to avoid an asset-resolution round-trip; see the webapp repo's
.env.example for the rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When enabled, sets VITE_DEMO_MODE=true which switches the login page
to LoginDemo.vue with auto-generated demo account creation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When services.webapp.src is set, it is used directly instead of
builtins.fetchGit. This allows passing a flake input as the source,
which is required for pure evaluation mode in Nix flakes.