Here’s the scenario:
I have 2 nixos machines, one laptop and one desktop. The desktop machine has limited or no internet access - enough to check emails but not enough to download 3GB for
nixos-rebuild switch --upgrade.
I keep the laptop up to date, and can build the whole desktop from my laptop:
nix-build desktop.nix nix-copy-closure --to desktop result/
Everything works fine in this scenario, until you want to nixos-rebuild on the desktop.
If I execute nixos-rebuild --switch from the desktop, it’s nix channel is super oudated and it can’t even parse the configuration.nix. If i run
sudo nixos-rebuild switch --upgrade from the desktop, it parses configuration.nix but wants to download 3GB of stuff that the laptop likely already has.
Am I missing something obvious?