Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

flk activate

Enter the Nix development shell for your project.

flk activate
flk activate --profile backend

Options

  • -p, --profile <PROFILE>: Activate a specific profile instead of the default

Behavior

  • Runs nix develop .#<profile> --impure to enter the dev shell
  • 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 .flk profile files change
  • Uses standard profile resolution when --profile is not specified
  • Custom commands and environment variables from the profile are available inside the shell

Notes

  • For automatic environment switching when navigating between projects, add the shell hook:
    eval "$(flk hook bash)"   # or zsh/fish
    
  • For automatic activation when entering a directory, use direnv integration

See Also

  • flk hook — for refresh and switch commands
  • flk direnv — for automatic directory-based activation