feat(nix): lib.mkWebapp accepts extraEnv attr #100
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/lib-mkwebapp-extraenv"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unblocks the strategic deploy fix on the server-deploy / webapp-module side. Without this, callers can't bake
VITE_BASE_PATH,VITE_LNBITS_BASE_URL, etc. into the build throughlib.mkWebappand have to fall back to their own derivations (the duplicated-hash problem that caused #99).Change
lib.mkWebappgrows anextraEnv ? {}attr. It merges on top of the brand kit + sandbox defaults (BRAND_DIR,BRAND_APP,CI) and feeds the derivation's env.Strict carve-out
VITE_APP_NAMEviaextraEnvis a no-op by design: the per-app vite configs (vite.events.config.tsetc.) internally setprocess.env.VITE_APP_NAME = brand.nameafter the derivation starts, overwriting the env value. This is exactly the strict behavior #99 landed — brand name flows throughbrand.jsononly.Per-host name customization should go through per-host
brandDir(server-deploy migration tracked separately). Documenting this here so the next person who tries to overrideVITE_APP_NAMEviaextraEnvdoesn't waste time debugging.Test plan
nix build .#main— unchangednix build --impure --expr '...lib.mkWebapp { pkgs; app = "events"; extraEnv = { VITE_BASE_PATH = "/events/"; }; }'— builtevents.htmlhashref="/events/icons/favicon.ico"etc., proving the env baked in🤖 Generated with Claude Code