Located at nix/flake-parts/turnkey/default.nix.
Provides the user-facing API for Turnkey configuration in flakes.
type = types.bool;
default = true;Enable/disable Turnkey toolchain management.
type = types.attrsOf types.path;
default = {};Map shell names to toolchain.toml files:
declarationFiles = {
default = ./toolchain.toml;
ci = ./toolchain.ci.toml;
};type = types.lazyAttrsOf types.package;
default = {};Custom toolchain registry. If empty, uses default registry.
type = types.bool;
default = true;Wrap go, cargo, uv with auto-sync behavior. Every version of the
registry's entry is wrapped, so the wrapper runs the tool toolchain.toml
resolves.
Nested options for Buck2 integration. They are declared once, in
nix/buck2/options.nix, which the devenv module uses as well; this module
adds only buck2.shells, builds the dependency cells, and hands the whole
value to each shell's devenv module. The main ones:
enable- Enable Buck2 cell generationprelude.path- A prelude to use instead of turnkey's (off the supported path; turns test result caching off)go.enable,go.depsFile- Go dependency configurationrust.enable,rust.depsFile- Rust dependency configurationpython.enable,python.depsFile- Python dependency configuration
The module:
- Imports default registry
- Builds tw wrappers for native tools
- Creates shell configurations for each declaration file
- Passes configuration to devenv module
Add new options in the options.perSystem block and implement in config.perSystem.