Project config directory (with common/, frontend/, backend/ subtrees). Its common/ and frontend/ subtrees are bundled into the production server as public configs; backend/ is never bundled (it may hold secrets; supply those to the running server at runtime).
Type: null or absolute path
Default:
nullExample:
./configThe nix-haskell driver the project is built with. The nixpkgs driver has no wasm compiler of its own. It reaches the wasm target only through a ghc-wasm-meta bindist.
Type: one of “haskell-nix”, “nixpkgs”
Default:
"haskell-nix"Example:
"nixpkgs"GHCJS-compiled frontend derivation.
Type: null or package
Default:
cross-exe { platform = "ghcjs"; package = "frontend"; exe = "frontend"; }Example:
config.haskell-nix.cross-exe { platform = "ghcjs"; package = "admin"; exe = "admin"; }Whether to compress frontend JS with brotli/gzip.
Type: boolean
Default:
trueExample:
falseCompressed frontend jsexe for obelisk-asset-serve-snap.
Type: null or package
Default:
assets.mkAssets optimizedExample:
assets.mkAssetsWith assets.noEncodings config.obelisk.frontend.js.optimizedWhether to run closure-compiler on frontend JS.
Type: boolean
Default:
trueExample:
falseFiles passed as --externs. The jsexe’s own all.externs.js goes first.
Type: list of absolute path
Default:
[ ]Example:
[ ./externs.js ]Flags added after the flags closure-compiler declares.
Type: list of string
Default:
[ ]Example:
[
"--formatting PRETTY_PRINT"
]Closure-compiler optimization level.
Type: one of “BUNDLE”, “WHITESPACE_ONLY”, “SIMPLE”, “TRANSPILE_ONLY”, “ADVANCED”
Default:
"ADVANCED"Example:
"SIMPLE"Closure-compiled frontend jsexe.
Type: null or package
Default:
js-optimize { jsexe = "${package}/bin/frontend.jsexe"; }Example:
config.js-optimize { platform = "ghcjs"; package = "admin"; exe = "admin"; jsexe = "${adminJs}/bin/admin.jsexe"; }Frontend compilation target.
Type: one of “js”, “wasm”
Default:
perDriver { haskell-nix = "wasm"; nixpkgs = "js"; }Example:
"js"WASM-compiled frontend derivation.
Type: null or package
Default:
cross-exe { platform = "wasi32"; package = "frontend"; exe = "frontend"; }Example:
config.haskell-nix.cross-exe { platform = "wasi32"; package = "admin"; exe = "admin"; }Whether to compress frontend WASM with brotli/gzip.
Type: boolean
Default:
trueExample:
falseCompressed WASM frontend for obelisk-asset-serve-snap.
Type: null or package
Default:
assets.mkAssets optimizedExample:
assets.mkAssetsWith assets.noEncodings config.obelisk.frontend.wasm.optimizedWhether to run wasm-opt on frontend WASM.
Type: boolean
Default:
trueExample:
falseFlags passed to wasm-opt after the level. They replace the declared flags.
Type: list of string
Default:
[
"-ol 2"
"-s 1"
"--low-memory-unused"
"--strip-dwarf"
"--converge"
]Example:
[
"--converge"
]wasm-opt optimization level (-O).
Type: one of “0”, “1”, “2”, “3”, “4”, “s”, “z”
Default:
"2"Example:
"z"Optimized WASM frontend jsexe directory.
Type: null or package
Default:
wasm-optimize and wasm-jsffi, with the wasi shimExample:
pkgs.runCommand "frontend.jsexe.wasm" {} "cp -r ${./dist-wasm} $out"Whether to compress static assets with zopfli/gzip.
Type: boolean
Default:
trueExample:
falseStatic assets preprocessed for obelisk-asset-serve-snap, with optional compression.
Type: null or package
Default:
assets.mkAssets rawStaticExample:
pkgs.runCommand "static" {} "cp -r ${./static-prebuilt} $out"Static assets path or derivation.
Type: null or absolute path or package
Default:
nullExample:
import ./static { inherit pkgs; }