I’m working on configuring nixos with flakes to be able to update from a github repository, however, I’m running into problems when rebuilding, as the rebuilder is using a downloaded version of the github repo rather than updating each time. What argument should I pass to force nixos-rebuild to fetch from github on every rebuild?
Just to make sure I understand your problem correctly, you do run nixos-rebuild switch --flake github:…, realize you missed something, do some change, push to GitHub, run nixos-rebuild switch --flake github:… again, but nothing gets rebuild as nix reuses the last version of your remote repo you had?
There are basically 2 options:
Wait for an hour until the tarballs TTL expired
reducte the tarball TTL via --option tarball-ttl 0, --tarball-ttl 0 or --refresh. Not all nix commands understand all of these variants. Though --option tarball-ttl 0 should be recognized by all of them.
I’d also suggest just building the flake from your local repo until things are mostly set in place, and then start building from github. That’ll save you some round trip time and fix this problem in one go.