Install NixOS on Hetzner Cloud: Difference between revisions
Oldhomemovie (talk | contribs) No edit summary |
Oldhomemovie (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
There are several ways to install NixOS, such as the "traditional" ISO installation, [[nixos-infect]] or [[nixos-anywhere]]. | There are several ways to install NixOS, such as the "traditional" ISO installation, [[nixos-infect]] or [[nixos-anywhere]]. | ||
=== | === Tradition ISO installation === | ||
TODO | |||
=== nixos-anywhere === | |||
The tutorial assumes you already have an account on Hetzner Cloud, and no prior access to a system with NixOS or nix CLI utility installed: | The tutorial assumes you already have an account on Hetzner Cloud, and no prior access to a system with NixOS or nix CLI utility installed: | ||
# Create a temp folder for future use. Run:<syntaxhighlight lang="shell"> | # Create a temp folder for future use. Run:<syntaxhighlight lang="shell"> | ||
| Line 169: | Line 172: | ||
nix run --extra-experimental-features 'nix-command flakes' github:nix-community/nixos-anywhere -- --flake /tmp/my-first-flake#my-hetzner-vm nixos@0.0.0.0 --build-on-remote | nix run --extra-experimental-features 'nix-command flakes' github:nix-community/nixos-anywhere -- --flake /tmp/my-first-flake#my-hetzner-vm nixos@0.0.0.0 --build-on-remote | ||
</syntaxhighlight>'''Note''': replace <code>0.0.0.0</code> with an IP address obtained during an earlier step. | </syntaxhighlight>'''Note''': replace <code>0.0.0.0</code> with an IP address obtained during an earlier step. | ||
The NixOS on Hetzner is installed! Let's do a few more steps to customize the installation. | The NixOS on Hetzner is installed! | ||
Let's do a few more steps to customize the installation. | |||
#Copy flake files onto the server. Run:<syntaxhighlight lang="shell"> | #Copy flake files onto the server. Run:<syntaxhighlight lang="shell"> | ||
scp -r /tmp/my-first-flake eugene@0.0.0.0:~/ | scp -r /tmp/my-first-flake eugene@0.0.0.0:~/ | ||