Troubleshooting
Nix not found
command not found: nix or flk commands fail with Nix errors.
- Install Nix (see Installation) and check
nix --version. - Enable flakes in
~/.config/nix/nix.conf:experimental-features = nix-command flakes - Open a new shell.
Search or version lookup errors
flk search or flk add --version fails with network or evaluation errors.
Both run nix run github:vic/nix-versions, which needs network access. Try it directly to see the real error:
nix run github:vic/nix-versions -- -p ripgrep
Behind a proxy, check Nix’s proxy settings.
Lock file missing or corrupted
error: getting status of flake.lock: No such file or directory
nix flake lock # regenerate
flk lock restore latest # or restore a backup
Shell hook not working
switch and refresh don’t exist after activating.
- Check the hook is in your rc file (flk hook).
- Open a new shell and run
flk activate. type switchshould print a function.
direnv not loading the environment
The environment doesn’t load when you enter the directory.
- Run
flk direnv init, thendirenv allow. - Check direnv’s own hook is in your rc file.
- Check
.envrccontains ause flakeline.
Package not found
flk add <package> fails with “package not found”.
The nixpkgs name may differ from the binary name (ripgrep, not rg). Look it up with flk search <term>; flk deep-search <package> lists versions.
Unfree license refusal
Entering the shell fails with “has an unfree license (‘unfree’), refusing to evaluate”.
Allow the package by the name in the error (the quoted slack-4.49.89 means flk unfree add slack), then run refresh. See flk unfree.
Profile errors
“Profile not found” or profile-related errors.
Run flk profile list to see what exists. Profile names may contain only letters, digits, - and _.
Activation fails
flk activate or nix develop fails with evaluation errors.
- Look for syntax errors in
.flk/profiles/*.nix. - Run
nix flake check. - If an input broke,
flk lock restore latest; if it’s just old,flk update.
Container export issues
flk export --format docker fails.
Docker or Podman must be installed and running, and you need permission to use it. docker info or podman info should succeed.