diff --git a/nix/modules/hive-matrix.nix b/nix/modules/hive-matrix.nix index 3c17d271..85716052 100644 --- a/nix/modules/hive-matrix.nix +++ b/nix/modules/hive-matrix.nix @@ -191,16 +191,17 @@ in # the browser resolves relative asset paths (`Imaging.js`, # `flutter.js`, `splash/*`) against the document ROOT, # producing 404s for every asset (#634). Inject the right - # base-href into the build via nixpkgs's `buildFlutterApplication` - # targetFlags. When subdomain routing lands (#609 — - # `matrix.${hyperhiveDomain}`), drop this override; upstream's - # `/` base-href is correct at the root of a dedicated subdomain. - targetFlags = (old.targetFlags or [ ]) ++ [ - "--base-href" - "/matrix/" - ]; + # base-href into the actual `flutter build web` invocation + # via the upstream derivation's `flutterBuildFlags` string + # (the buildPhase is literally + # `flutter build web -v $flutterBuildFlags`). When subdomain + # routing lands (#609 — `matrix.${hyperhiveDomain}`), drop + # this override; upstream's `/` base-href is correct at the + # root of a dedicated subdomain. + flutterBuildFlags = + (old.flutterBuildFlags or "") + " --base-href /matrix/"; }); - defaultText = lib.literalMD "`pkgs.fluffychat-web` rebuilt with `--base-href /matrix/` via `targetFlags`."; + defaultText = lib.literalMD "`pkgs.fluffychat-web` rebuilt with `--base-href /matrix/` via `flutterBuildFlags`."; description = '' Static web client dist to serve at `/matrix/`. Defaults to `pkgs.fluffychat-web` rebuilt with `--base-href "/matrix/"`