In the past I’ve run a command like this on my laptop to build a new configuration on my laptop and install it to remote server:
nixos-rebuild switch --upgrade --build-host localhost --target-host root@machine-b -I nixos-config=/home/someguy/projects/nixos/machine-b/configuration.nix
This is nice because I can keep all the nix files on my laptop, let my laptop do all the heavy lifting, etc.
But that means if I want to build 21.11 remote systems then I have to keep my laptop on 21.11 .
What I really want to do is run unstable on my laptop but build 21.11 systems from it using nixos-rebuild.
Possible?
PS. I do have a third system available (call it BigBox) running 21.11 that I could do the builds on. But I still want the config.nix to live on my laptop only.