Install NixOS on Online.Net: Difference between revisions
imported>Fadenb m Syntax highlighting |
imported>Nix m add Server category |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
==Preparation== | ==Preparation== | ||
===Be root=== | === Be root=== | ||
No reason not to be: | No reason not to be: | ||
Line 14: | Line 14: | ||
cd | cd | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Create builders === | |||
<syntaxhighlight lang="bash"> | |||
groupadd nixbld | |||
useradd nixbld1 | |||
useradd nixbld2 | |||
useradd nixbld3 | |||
useradd nixbld4 | |||
gpasswd -a nixbld1 nixbld | |||
gpasswd -a nixbld2 nixbld | |||
gpasswd -a nixbld3 nixbld | |||
gpasswd -a nixbld4 nixbld | |||
</syntaxhighlight> | |||
=== Add missing packages === | |||
<syntaxhighlight lang="bash"> | |||
apt install bzip2 btrfs-tools | |||
</syntaxhighlight> | |||
===Change the UI language=== | ===Change the UI language=== | ||
Line 73: | Line 92: | ||
. /root/.nix-profile/etc/profile.d/nix.sh | . /root/.nix-profile/etc/profile.d/nix.sh | ||
nix-channel --remove nixpkgs | nix-channel --remove nixpkgs | ||
nix-channel --add http://nixos.org/channels/nixos- | nix-channel --add http://nixos.org/channels/nixos-17.09 nixos | ||
nix-channel --update | nix-channel --update | ||
Line 116: | Line 135: | ||
}; | }; | ||
# Not strictly required, but useful to be able to use the serial console | |||
boot.kernelParams = [ "console=ttyS1" ]; | |||
networking.hostName = "yourhostname"; | networking.hostName = "yourhostname"; | ||
networking.interfaces.eth0 = { ipAddress = "your ip address"; prefixLength = 24; }; | networking.interfaces.eth0 = { ipAddress = "your ip address"; prefixLength = 24; }; | ||
networking.defaultGateway = "your gateway"; | networking.defaultGateway = "your gateway"; | ||
networking.nameservers = [ "62.210.16.6" "62.210.16.7" ]; | networking.nameservers = [ "62.210.16.6" "62.210.16.7" ]; | ||
# By default, systemd "predictable interface names" are used for network interfaces. | |||
# Since the Dedibox SC only has one network interface, it is safe to disable this, | |||
# and simply use eth0 as above. | |||
# If you remove this line, you need to replace "eth0" above by the correct interface name. | |||
networking.usePredictableInterfaceNames = false; | |||
i18n.defaultLocale = "en_US.UTF-8"; | i18n.defaultLocale = "en_US.UTF-8"; | ||
Line 160: | Line 188: | ||
See [https://github.com/NixOS/nixpkgs/commit/6ebe4a6a523bbab3388453ac119ab08e295a7e06 this commit] for the fix. | See [https://github.com/NixOS/nixpkgs/commit/6ebe4a6a523bbab3388453ac119ab08e295a7e06 this commit] for the fix. | ||
[[Category:Server]] |