install nixos everywhere via ssh
Go to file
2022-12-23 11:44:25 +01:00
.github/workflows CI: publish docs to github pages 2022-12-21 19:43:45 +01:00
docs add minimal docs framework 2022-12-21 19:36:39 +01:00
tests nixos-test: use evaluated kexec image 2022-12-23 11:22:23 +01:00
.gitignore gitignore results 2022-12-09 15:08:07 +01:00
flake.lock add flake for nixos-remote 2022-12-09 15:08:07 +01:00
flake.nix nixos-test: use evaluated kexec image 2022-12-23 11:22:23 +01:00
LICENSE Create LICENSE 2022-12-23 11:44:25 +01:00
nixos-remote remove POSIX sh 2022-12-21 19:07:29 +01:00
nixos-remote.nix add minimal docs framework 2022-12-21 19:36:39 +01:00
README.md nixos-remote: DHCP is no longer a requirement 2022-12-23 11:29:18 +01:00

nixos-remote - install nixos everywhere via ssh

nixos-remote makes it possible to install nixos from Linux machines reachable via ssh. Under the hood uses a kexec image to boot into a NixOS installer from a running Linux system. It then uses disko to partition and format the disks on the target system before it installs the user provided nixos configuration.

Requirements

  • x86_64 Linux system with kexec support (most x86_64 machine do have kexec support)
  • At least 2.5GB RAM (swap does not count). If you do not have enough RAM you will see failures unpacking the initrd), this is because kexec needs to load the whole nixos into memory.

Usage

Needs a repo with your configurations with flakes. For a minimal example checkout https://github.com/Lassulus/flakes-testing.

Your NixOS configuration will also need a disko configuration as we can see in our example

Afterwards you can just run:

./nixos-remote root@yourip --flake github:your-user/your-repo#your-system

The parameter passed to --flake should point to your nixos configuration exposed in your flake (nixosConfigurations.your-system in the example above).