The question is: when ever I change my home-manager config and rebuild NixOS, the changes are not taking effect. I need to do nix flake update and then rebuild NixOS, and only then the changes will take effect.
I want to avoid running nix flake update because it will update the lock files of all the flakes and I might wait a while for the NixOS rebuilding to finish if there were many changes in various flakes. Also, I want to run nix flake update as less frequently as possible.
Afaik, what. You request is not how flake inputs work. It’s one of the base idea that they go to the lock file, if I understand them correctly.
Tho there is a command to not update every input but specific ones. Maybe that is an acceptable solution.
When you run nix flake lock --update-input <input name> l (typed from smartphone and I am not 100% sure if it is correct, so give it a short cross check in the man or help pages)
On nix 2.19+ it’s now nix flake update <input name> but you’re correct for 2.18 and below.
Though, if they’re trying to use an output from the same flake, then updating the lockfile shouldn’t be necessary
@refaelsh where exactly are you consuming the module? is it in the same flake or somewhere else?
Ok, so separate flakes.
In that case, you can simply update the single input by follow shawn’s answer (or mine, depending on which version of nix you use.)
Alternatively you can use -- --override-input home-manager /path/to/home-manager if you want a quick-and-dirty way to test out changes without having to update the lockfile each time.
This local home-manager flake is not the only input to my NixOS flake.
What you are suggesting is, that every time I make a change in one of the inputs I need to think what input to update before rebuilding NixOS. This is very clunky.