I would look for a place you’re accidentally copying subdirs of your flake to the nix store as independent objects. This happens, for example, if you use a path-type inside an antiquote.
Yes, that was it! Chatting with AI yielded the same advice just before I saw your reply. The simple fix is here.
But since it was not (at all!) obvious to me and may be a trap that others land in… here is the more detailed explanation (courtesy Gemini 3 Pro):
-–
Somewhere in your flake.nix (or wherever you import host), you are likely referencing the host directory using string interpolation (quotes) or a function that converts a path to a string.
When you wrap a path in quotes "${./host}...", Nix immediately copies only that directory (./host) to the Nix store (e.g., resulting in /nix/store/abc...-host).
Your stylix.nix is now living inside this isolated store path.
When stylix.nix tries to import ../../theme:
One .. goes to the root of the isolated store path (/nix/store/abc...-host).
The next.. (from ../../theme) attempts to traverse out of the store path, landing in /nix/store.
It then looks for theme, resulting in /nix/store/theme.
Since /nix/store/theme does not exist (and is an absolute path forbidden in pure mode), the build fails.
The Fix
You must pass the path as a path literal so Nix understands it is part of the larger flake source tree.