Closed mem101296 closed 2 months ago
Probably store corruption
Ran:
sudo nix-store --repair --verify --check-contents
However the error still persists.
In that case, please provide a repo to reproduce the issue
nixos-rebuild dry-build --option experimental-features "flakes nix-command" --flake github:mem101296/NixOS-dotfiles#unus
seems to work fine on my end. I'm still leaning towards something being broken in your store
What should I do to resolve this error?
If you run the exact command I ran, does that also result in an error?
Yes it does, same error.
Not sure then, honestly. Maybe someone else has more insights.
Is there a way for me to tell how it ends up in the flake.lock?
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"path": "/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "path"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
Is there a way for me to tell how it ends up in the flake.lock?
"systems_7": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "path": "/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "path" }, "original": { "id": "systems", "type": "indirect" } },
Seems to be an input of nix-citizen if I read that correctly https://github.com/mem101296/NixOS-dotfiles/blob/b899d1f7538cfae58cf12281390b0e8fd4636b4a/flake.lock#L454
That commit here seems to have override their lock file with a store path https://github.com/LovingMelody/nix-citizen/commit/dcc65e3e76f926fb6cb81bf903a6ffc7bdaa84aa
Good catch, this is why I avoid using others' flakes when possible. But the linked PR should fix it.
You can also fix it on your end by adding the following to the inputs
attrset:
nix-citizen.inputs.systems.url = "github:nix-systems/default";
followed by nix flake update systems
or nix flake lock --update-input systems
, depending on your version of nix
.
While updating NixOS, this error orccurs:
Here is my flake.nix: