Open roberth opened 1 year ago
As a workaround, I have done this manually:
nixos-rebuild build --flake <flake>
nix-copy-closure --to <host> result
nixos-install --system <system-closure>
Of course, that requires nixos-install
on the target!
I think that's nixos-rebuild build
in (1)?
Of course, that requires
nixos-install
on the target!
Ideally we shouldn't even need nixos-rebuild
on the target. I think it only needs to copy the closure, set the profile and call activate. On the target, nix
should suffice, even just a store-only one:
Such minimalism is up to the final configuration though. It seems like a good tradeoff to keep some of these commands on the installation media configurations:
- runs the local copy of
nixos-generate-config
Project description
Adding a
--target-host
option (likenixos-rebuild
has) to these tools will make remote installations much easier, and allows ad hoc installation on lightweight hardware that may not be big enough to evaluate its config.Example work flow:
nixos-generate-config --target-host HOST --root /mnt --dir .
HOST
nixos-generate-config
with--root /mnt --dir $tmp
--dir
.--dir
is mandatory when--target-host
is specifiedconfiguration.nix
intonixosConfigurations.host
nixos-install --target-host HOST --root /mnt --flake .#host
nixos-install
script.nixos-install
need not be part oftoplevel
for this to work!ssh
Nice to have:
tmux
orscreen