User Tools

Site Tools


manuals:distributions:nixos

This is an old revision of the document!


NixOS

NixOS is a distribution based on the Nix package manager. It allows one to declaratively configure the system and its services. This page describes NixOS specifics on vpsFree.cz's VPS. For more information about NixOS in general, see its documentation.

Supported versions

We provide templates for the stable releases and continually for unstable.

NixOS is used heavily at vpsFree.cz for its infrastructure and services, so we make sure that it works reliably. We use mainly the current stable release. Our virtualization platform vpsAdminOS is actually based on NixOS and nixpkgs.

Initial configuration

The VPS is created from a template which contains a minimal system with SSH. You can log in using a generated password or deploy your public key using vpsAdmin. The system can then be configured using :

nixos-rebuild switch --flake /etc/nixos#vps

Note that our VPS are Linux containers, so there is no boot loader, the kernel is shared and some configuration is required for the VPS to work properly. The template handles this by using vpsAdminOS as flake input and importing the necessary module.

It is possible to deploy custom configuration using vpsAdmin on VPS creation and reinstallation, see user data.

VPS management

See the VPS manuals for more information about our infrastructure and possibilities.

Impermanence

GitHub API limit

Nixpkgs are downloaded from GitHub and Binary Cache. GitHub does not support IPv6 and rate limits either per IPv4 or per user. After exhausting the API limit, Nix (or rather GitHub API) complains:

error: unable to download 'GITHUB_URL': HTTP error 403 ('')

       response body:

       {"message":"API rate limit exceeded for IP_ADDR. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

The solution is to create personal access token (Public repositories, the Permissions could be blank) and enter the configuration to Nix:

# configuration.nix
nix.settings.access-tokens = [ "github.com=github_pat_TokenTokenChangeMe" ];
manuals/distributions/nixos.1786383952.txt.gz · Last modified: by panika