I’m trying to figure out what nix-channel --update actually does. My understanding was that if I add a URL to a tarball with nix-channel --add then nix-channel --update
would download that tarball
extract the tarball if it has changed
create a new channel generation if any of the tarballs have changed
My problem is that I have made changes to the tarball on the server but I don’t get those changes in ~/.nix-defexpr/channels/ after running nix-channel --update. I also noticed that the only output of nix-channel --update is unpacking channels..., nothing about downloading channels.
Did I misunderstand how nix-channel --update works?
Nix caches downloads made through builtin fetchers, so if a given source has been downloaded recently enough, nix won’t check if it’s changed. I think this would also apply to nix-channel --update.
Simplest way to fix it is wait an hour. The default cache TTL is 1 hour. There are options to most nix commands to override the TTL for that command, but I don’t think nix-channel accepts them. So I guess the only option in that case would be to temporarily change the tarball-ttl option in nix.conf to 0.