Skip to main content

Remote Installation

Install a NixOS system remotely as long as it can accept root SSH connections.

  • Going to use Disko for declarative partitioning
  • Nixos-anywhere for remote installation magic either with included nix tools on OS installation disc or loading a Nix environment via linux kexec.

Setup Remote

  • Ensure that your hosts SSH key is authorized, or you can allow remote root logins.

If you are going to be encrypting your disks with LUKS - Make sure you either copy the keys or create the passphrase on the remote system.

Hint echo -n "password" > /tmp/secret.key will create a passphrase on the local system without a trailing \n

  • Setup disk profile with Disko - See examples.

  • Setup your flake

  • nix run github:numtide/nixos-anywhere -- --flake .#<your-machine> root@<remotehost>