Install NixOS on Hetzner Cloud: Difference between revisions
m →disko: link to disko |
m →Hetnzer base configuration: Fix typo |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 51: | Line 51: | ||
Once installed, unmount the ISO and reboot. | Once installed, unmount the ISO and reboot. | ||
===== | ===== Hetzner base configuration ===== | ||
In the example below, the id would be `hetzner-x86_64`. | In the example below, the id would be `hetzner-x86_64`. | ||
| Line 158: | Line 158: | ||
]; | ]; | ||
networking.useDHCP = lib.mkDefault true; | networking.useDHCP = lib.mkDefault true; | ||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
| Line 269: | Line 264: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
#To build NixOS from the flake run:<syntaxhighlight lang="shell"> | #To build NixOS from the flake run:<syntaxhighlight lang="shell"> | ||
nix run --extra-experimental-features 'nix-command flakes' github:nix-community/nixos-anywhere --flake /tmp/my-hetzner-vm#my-hetzner-vm root@0.0.0.0 --build-on-remote | nix run --extra-experimental-features 'nix-command flakes' github:nix-community/nixos-anywhere -- --flake /tmp/my-hetzner-vm#my-hetzner-vm --target-host root@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! | The NixOS on Hetzner is installed! | ||