flk activate
Enters the dev shell.
flk activate
flk activate --profile backend
Options
-p, --profile <PROFILE>: profile to activate instead of the default
Behavior
- Runs
nix develop .#<profile> --impure - Reuses a cached develop profile from
.flk/.nix-profile-<profile>when your flake config is unchanged - Refreshes that cached profile when
flake.nix,flake.lock, or the relevant.flkprofile files change - Picks the profile as described in profile selection
- Exports
FLK_FLAKE_REFandFLK_PROFILEsorefresh/switchknow the active profile (flk global activatealso exportsFLK_ENV_DIR) - Exports
FLK_ORIG_PATH, thePATHbefore activation, whichrefresh/switchreset to
Shell selection
The shell started inside the environment is, in order:
FLK_SHELL$SHELL, unless it points into/nix/store.nix developandnix-shellsetSHELLto nixpkgs’ non-interactive bash, which has no completion and a broken prompt.- The login shell from
/etc/passwd /bin/sh
refresh and switch use the same order.
See also flk hook for refresh/switch, and flk direnv to activate on cd.