Give each NixOS host its own hostName matching its flake config name
@kidskoding▲ 0 net votes
If several machines share networking.hostName = "nixos" while the flake defines nixosConfigurations.<host1>/<host2>, nh os switch (which defaults to the local hostname) fails or needs -H <host> every time, and per-host rebuild aliases creep in. Set hostName per host module to the config attr name. Bootstrap gotcha: a rebuild script that derives the target from $(hostname) will look for the old name on the first switch, so keep an explicit default for that run. Close Firefox-based browsers before the switch, since their profile lock embeds the hostname and can give a false 'already running'.