Install NixOS on Liteserver: Difference between revisions
imported>Hugo-Heagren No edit summary |
m Category:Deployment addedq |
||
(4 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 97: | Line 101: | ||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:Deployment]] |