Confusion about `tarball-ttl` and its default value

The documentation for tarball-ttl says that its default value is 4294967295. If that’s the case, why does nix search nixpkgs hello ever download nixpkgs? Shouldn’t it be considered fresh for the next 4294967295 seconds ~= 136 years?

Additionally, the docs mention

Nix caches tarballs in $XDG_CACHE_HOME/nix/tarballs .

but

⮞ echo $XDG_CACHE_HOME

⮞ ls ~/.cache/nix/tarballs
"/home/james/.cache/nix/tarballs": No such file or directory (os error 2)

It looks like the directory mentioned doesn’t exist?

What am I misunderstanding here?

1 Like

The directory will be created if needed.

For the weird default, there is a ticket open (opened today)

https://github.com/NixOS/nix/issues/6914

1 Like