Toto je starší verze dokumentu!
NixOS template is available based on NixOS 17.03. NixOS allows declarative configuration management of the whole system and deployed services.
Configuration is available at
/etc/nixos/configuration.nix
This can be altered to change container configuration on the fly or for next reboot. Try changing container hostname and running
nixos-rebuild switch
to build new configuration and directly switch to it. To switch to new configuration after reboot (set as a default boot profile) use
nixos-rebuild boot
Packages can be installed system wide via configuration.nix or for local profile via
nix-env
To install vim use
nix-env -iA nixos.vim
To search for a package use
nix-env -qaP postgre
Consult NixOS manual for more https://nixos.org/nixos/manual/
Nix ≥ 1.11.10 requires seccomp, which is not available on vpsFree. To fix this, pin Nix to 1.11.9 by adding the following option to configuration.nix
and rebuilding the system:
nix.package = (import (pkgs.fetchFromGitHub { owner = "NixOS"; repo = "nixpkgs"; rev = "300fa462b31ad2106d37fcdb4b504ec60dfd62aa"; sha256 = "1cbjmi34ll5xa2nafz0jlsciivj62mq78qr3zl4skgdk6scl328s"; }) {}).nix;
In the future, it will be possible to disable seccomp usage.