Nixvim's flake keeps updating my flake.lock file #2291
-
I am using the stand alone flake for Nixvim. And I use its output package in systemPackages. diff --git a/flake.lock b/flake.lock
index bf5ca808..116e2f49 100644
--- a/flake.lock
+++ b/flake.lock
@@ -283,11 +283,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-Yu5tiYabepl0wGMYe7m5DlV70R4yIgkAyRsf+/Lgyw0=",
- "path": "/nix/store/c1i7f9j9j75gi39x5dxysiwz9rz9q40y-source/nixvim",
+ "path": "/nix/store/jl19vjcsm4lpn5r8iqgg8zxwihmy657h-source/nixvim",
"type": "path"
},
"original": {
- "path": "/nix/store/c1i7f9j9j75gi39x5dxysiwz9rz9q40y-source/nixvim",
+ "path": "/nix/store/jl19vjcsm4lpn5r8iqgg8zxwihmy657h-source/nixvim",
"type": "path"
}
},
(END) Is that normal? I have a feeling its not. What can I do please? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 19 replies
-
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 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 My advice would be to always have your inputs point to If you're trying to keep both flakes in sync, then perhaps they should just be a single flake? |
Beta Was this translation helpful? Give feedback.
-
Well, I do use a relative path in my inputs. The whole thing is here: https://github.com/refaelsh/dotfiles. inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim.url = "./nixvim";
}; I do indeed use a relative path for the Nixim flake.
Can something be done about the constantly auto updating lock file? |
Beta Was this translation helpful? Give feedback.
-
Now that I have gained more flakes knowledge, I can answer this question. |
Beta Was this translation helpful? Give feedback.
-
It my NixOS flake.
Exactly that.
Yes, but: |
Beta Was this translation helpful? Give feedback.
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…