Upgrading flakes in nix profile installed from private git repositories

I have hard time understanding how one can upgrade flakes installed from private git repositories. I’ve installed a flake with

nix profile install git+ssh://git@github.com/me/my-package.git#my-program

In earlier nix versions, when I made new commits to the repository, I was able to update the flake with

nix profile upgrade packages.x86_64-linux.my-program

However, now the “locked flake URL” does no longer change when running the new upgrade command

nix profile upgrade my-program

I’ve not found any information regarding this behavior elsewhere and I have not found any flag combination in the command to get this working again.

Well, found it immediately after posting this question. The old behavior can be achieved with

nix profile upgrade my-program --refresh

That generally means you’re trying too often within the timeout.

1 Like