Describe the bug
When a configuration.nix that used by flake.nix of nixos config is empty, the store path of flake is not exists in /nix/store, so its store object is not being realized.
Steps To Reproduce
git clone --depth 1 --revision 0defd19d32413f757d7273596cd9641cb91af25a --recurse-submodules https://github.com/n0099/nixos.git
nix repl --show-trace .
nixosConfigurations.nixos.config
gives
[stacktraces]
error: syntax error, unexpected end of file
at /nix/store/hbm2x6a84f4gyx43784v20dsayds8mc2-source/configuration.nix:1:1:
that store path /nix/store/hbm2x6a84f4gyx43784v20dsayds8mc2-source of this flake is not exists.
If there's content in configuration.nix
echo '{}' > configuration.nix
rerun nix repl and eval previous expr will realize the store object of flake.
If then mark configuration.nix as skip-worktree:
git update-index --skip-worktree configuration.nix
it'll stop realize the flake again.
If then do anything to make git worktree dirty like
it'll be able to realize again.
Expected behavior
Realize the flake's store object.
Metadata
nix (Determinate Nix 3.19.0) 2.34.6
Additional context
It's not reproducible on upstream Nix 2.34.6 that detsys nix 3.19.0 based on, and previous version of detsys nix 3.18.1: v3.18.1...v3.19.0
Checklist
Describe the bug
When a
configuration.nixthat used byflake.nixof nixos config is empty, the store path of flake is not exists in/nix/store, so its store object is not being realized.Steps To Reproduce
git clone --depth 1 --revision 0defd19d32413f757d7273596cd9641cb91af25a --recurse-submodules https://github.com/n0099/nixos.git nix repl --show-trace .gives
that store path
/nix/store/hbm2x6a84f4gyx43784v20dsayds8mc2-sourceof this flake is not exists.If there's content in
configuration.nixrerun nix repl and eval previous expr will realize the store object of flake.
If then mark
configuration.nixasskip-worktree:it'll stop realize the flake again.
If then do anything to make git worktree dirty like
it'll be able to realize again.
Expected behavior
Realize the flake's store object.
Metadata
nix (Determinate Nix 3.19.0) 2.34.6
Additional context
It's not reproducible on upstream Nix
2.34.6that detsys nix3.19.0based on, and previous version of detsys nix3.18.1: v3.18.1...v3.19.0Checklist