Install NixOS on Hetzner Cloud: Difference between revisions

Klinger (talk | contribs)
m added to Category:Cookbook
Hexa (talk | contribs)
Line 49: Line 49:
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
   systemd.network.enable = true;
   systemd.network.enable = true;
   systemd.network.networks."10-wan" = {
   systemd.network.networks."30-wan" = {
     matchConfig.Name = "ens3"; # either ens3 (amd64) or enp1s0 (arm64)
     matchConfig.Name = "ens3"; # either ens3 (amd64) or enp1s0 (arm64)
     networkConfig.DHCP = "ipv4";
     networkConfig.DHCP = "ipv4";
Line 66: Line 66:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
   systemd.network.networks."10-wan" = {
   systemd.network.networks."30-wan" = {
     networkConfig.DHCP = "no";
     networkConfig.DHCP = "no";
     address = [
     address = [
Line 81: Line 81:
== AArch64 (CAX instance type) specifics ==
== AArch64 (CAX instance type) specifics ==


If the screen goes blank after selecting the boot option in the bootloader, add this:
If the screen goes blank after selecting the boot option in the bootloader, the following snippet makes sure that GPU drivers are available in initrd, and the correct device gets used for the serial console:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">