Alternative lock file

Hi,

A flake file and its corresponding lock file have the same name by default.
The lock file is managed automatically and I don’t need open it often, but tab completion in terminal doesn’t know about such heuristics.
So every time I want open a flake file I have to type “.n” additionally.

I found command line arguments for customizing the lock file name, but I’m curious whether anyone has raised the issue about renaming the lock file or allowing lock customization inside the flake file itself.

That doesn’t seem like a fruitful path to explore, since the whole point is consistency.

Instead, I suggest configuring your shell to ignore such files; adding .lock to FIGNORE will work for bash and zsh, probably other shells have something similar.

4 Likes