Install NixOS on Liteserver: Difference between revisions
imported>Hugo-Heagren Update and finish |
m Category:Deployment addedq |
||
(5 intermediate revisions by one other user not shown) | |||
Line 65: | Line 65: | ||
boot.loader.grub.enable = true; | boot.loader.grub.enable = true; | ||
boot.loader.grub.version = 2; | boot.loader.grub.version = 2; | ||
boot.loader.grub.device = "/dev/vda" | boot.loader.grub.device = "/dev/vda"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Networking ==== | ==== Networking ==== | ||
The below setup does not include DHCP, and instead statically configures both IPV6 and IPV4. The IPV4 is especially important if you want to ssh into your server (which you almost certainly will -- the qemu portal offered by liteserver is not particularly nice to work with). We disable DHCP because it inteferes with such static configuration. | |||
<syntaxhighlight lang=" | You can find your IPV4 address listed as the 'Primary IP' on the front dashboard after you login to Liteserver's client area. It will look something like '192.0.2.0'. Your IPV4 gateway is your IPV4, with a '1' instead of the final number. So if your IPV4 address is '192.0.2.0', then your gateway is '192.0.2.1'. | ||
<syntaxhighlight lang="nix"> | |||
# We have to use static config (no DHCP) | |||
# to deal with Liteserver and enable proper SSH | |||
networking.useDHCP = false; | |||
systemd.network.enable = true; | systemd.network.enable = true; | ||
systemd.network.networks."10-wan" = { | systemd.network.networks."10-wan" = { | ||
matchConfig.Name = "ens3"; | matchConfig.Name = "ens3"; | ||
address = [ | address = [ | ||
# | "<YOUR IPV4 ADDRESS>/24" # the '/24' is *not* a typo | ||
"<YOUR MODIFIED SUBNET (from above)>" # e.g. 2a04:52c0:118:fe87::2/48 | "<YOUR MODIFIED SUBNET (from above)>" # e.g. 2a04:52c0:118:fe87::2/48 | ||
]; | ]; | ||
gateway = [ | |||
"<YOUR IPV4 GATEWAY>" | |||
"<YOUR GATEWAY (from above)>" | |||
]; | ]; | ||
}; | }; | ||
Line 92: | Line 96: | ||
As the end of the manual says, once you've finished the configuration, run <code>nixos-install</code>. ''Don't'' run <code>reboot</code> as the manual tells you to. Instead, go to the server settings and 'stop' the VPS. Then go to 'Boot Order' under Settings/VPS Configuration, and switch the order of the two entries. | As the end of the manual says, once you've finished the configuration, run <code>nixos-install</code>. ''Don't'' run <code>reboot</code> as the manual tells you to. Instead, go to the server settings and 'stop' the VPS. Then go to 'Boot Order' under Settings/VPS Configuration, and switch the order of the two entries. | ||
You should ''now' have 'DISK1' (or something similar) ''first'' (on top) and then 'CDROM1' (or something similar) ''second''. | You should ''now'' have 'DISK1' (or something similar) ''first'' (on top) and then 'CDROM1' (or something similar) ''second''. | ||
Now 'start' the VPS with the start button. If all went well, you should see a new GRUB menu and boot into a fresh Nixos system. | Now 'start' the VPS with the start button. If all went well, you should see a new GRUB menu and boot into a fresh Nixos system. | ||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:Deployment]] |