Skip to content

Nixvim's flake keeps updating my flake.lock file #2291

Answered by MattSturgeon
refaelsh asked this question in Q&A
Discussion options

You must be logged in to vote

I suspect this is a result of having your flake input be a relative path?

When you evaluate a flake, the first thing nix does is copy everything in the flake and it's inputs to the nix store. Then the actual work is done in the nix store. That's why when you see errors or warnings, it's always talking about files in /nix/store rather than ~/repos/dotfiles.

What is likely happening here is that the flake input has changed and therefore gets a different store location. I must admit, I thought that'd only happen when you ran nix flake lock, but I guess I was wrong?

My advice would be to always have your inputs point to github: or other similar remote URLs. Using local relative paths should r…

Replies: 4 comments 19 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by refaelsh
Comment options

You must be logged in to vote
16 replies
@khaneliman
Comment options

@refaelsh
Comment options

@refaelsh
Comment options

@MattSturgeon
Comment options

@MattSturgeon
Comment options

Comment options

You must be logged in to vote
3 replies
@MattSturgeon
Comment options

@refaelsh
Comment options

@MattSturgeon
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants