Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2947,"date":"2019-12-27T07:40:49","date_gmt":"2019-12-27T07:40:49","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2947"},"modified":"2019-12-27T07:40:49","modified_gmt":"2019-12-27T07:40:49","slug":"install-nixos-on-aklweb-host","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/install-nixos-on-aklweb-host\/","title":{"rendered":"Install NixOS on AKLWEB Host"},"content":{"rendered":"

NixOS is a purely functional Linux distribution. It can be found on\u00a0nixos.org<\/a>. A main reason to use NixOS is because it is completely declarative, which makes upgrading systems more reliable, and provides many other advantages too. This guide will show you how to install NixOS on AKLWEB Host.<\/p>\n

Installation<\/h3>\n
Upload ISO<\/h6>\n

Go to “My Servers > ISOs” in the AKLWEB Host dashboard. Add the following URL as an ISO.<\/p>\n

https:\/\/nixos.org\/releases\/nixos\/14.12\/nixos-14.12.526.98b8eb6\/nixos-minimal-14.12.526.98b8eb6-x86_64-linux.iso\r\n<\/code><\/pre>\n

The md5 must match “fe8cc2c587ddb14be447d14f1f380e5a”. Newer releases may be available on the\u00a0official site<\/a>.<\/p>\n

Deploy the ISO<\/h6>\n

Go to “Deploy”, use the location of your choice, select “x64”, and pick “Custom”. Then, choose “Virtual ISO” and select the just uploaded ISO.<\/p>\n

Place your order.<\/p>\n

Open the console<\/h6>\n

After the VPS has finished launching, go to “Manage”, then open “View Console”.<\/p>\n

Login as “root”, no password.<\/p>\n

Partition and create the file system<\/h6>\n

Partition the disk.<\/p>\n

fdisk \/dev\/vda\r\n\r\n# create a primary partition\r\n# use the \"n\" key, select \"p\" for primary, and the first partition (1). \r\n# Select the suggested values for the size.\r\n\r\n# Activate the partition, use \"a\", select the defaults.\r\n\r\n# Write the changes to disk, using \"w\"\r\n<\/code><\/pre>\n

Format the disk.<\/p>\n

mkfs.btrfs \/dev\/vda1 -Lroot\r\n# It's possible to use ext4 instead of btrfs:\r\n# mkfs.ext4 \/dev\/vda1 -Lroot\r\n<\/code><\/pre>\n

Mount the disk.<\/p>\n

mount \/dev\/disk\/by-label\/root \/mnt\r\n<\/code><\/pre>\n
Configure NixOS<\/h6>\n

Generate the basic configuration.<\/p>\n

nixos-generate-config --root \/mnt\r\n<\/code><\/pre>\n

Edit the newly generated configuration.<\/p>\n

$EDITOR \/mnt\/etc\/nixos\/configuration.nix\r\n<\/code><\/pre>\n

Change the following values. For more options, you can look at the\u00a0NixOS Manual: Options<\/a>.<\/p>\n

# Set the grub bootloader device to the correct\r\nboot.loader.grub.device = \"\/dev\/vda\";\r\n\r\n# Enable openssh\r\nservices.openssh.enable = true;\r\n# Disable root login\r\nservices.openssh.permitRootLogin = \"no\";\r\n\r\n# Add a user:\r\nusers.extraUsers.nixos = {\r\n    uid = 1000;\r\n    password = \"nixos\"; # Set this to something more secure.\r\n    extraGroups = [\"wheel\"];\r\n    useDefaultShell = true;\r\n};\r\n<\/code><\/pre>\n
Install<\/h6>\n
nixos-install\r\n# It will download the packages, install grub and set a root password.\r\n<\/code><\/pre>\n

If you have made a mistake,\u00a0nixos-install<\/code>\u00a0will throw an error. Edit the\u00a0\/mnt\/etc\/nixos\/configuration.nix<\/code>\u00a0file again.\u00a0nixos-install<\/code>\u00a0can be run as many times as necessary.<\/p>\n

Reboot<\/h6>\n

Go back to the dashboard, and remove the ISO.<\/p>\n

Reboot the instance.<\/p>\n

Verify<\/h6>\n

SSH to the machine.<\/p>\n

# Use the password set in `users.extraUsers.nixos.password`.\r\nssh nixos@IP\r\n<\/code><\/pre>\n
Snapshot your newly created machine<\/h6>\n

Open the AKLWEB Host dashboard and click on “Snapshot”. This will save a snapshot of your NixOS installation. From now on, you can deploy NixOS from a snapshot.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[242],"manual_kb_tag":[470],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2947"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2947"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2947\/revisions"}],"predecessor-version":[{"id":2948,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2947\/revisions\/2948"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2947"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2947"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}