Uživatelské nástroje

Nástroje pro tento web


navody:distribuce:nixos

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revizePředchozí verze
Následující verze
Předchozí verze
Následující verzeObě strany příští revize
navody:distribuce:nixos [2017/10/11 21:12] – mention seccomp issue jtojnarnavody:distribuce:nixos [2022/02/13 17:40] – page id Aither
Řádek 1: Řádek 1:
 +<page>manuals:distributions:nixos</page>
 ===== NixOS ===== ===== NixOS =====
  
-NixOS template is available based on NixOS 17.03. NixOS allows declarative configuration management of the whole system and deployed services.+NixOS allows declarative configuration management of the whole system and deployed services. 
 + 
 +To start using NixOS on vpsFree.cz, make sure you're on a node with [[navody:vps:vpsadminos]], you can recognize it e.g. by the kernel version: 
 + 
 +<code> 
 +# uname -rv 
 +5.9.2 #1-vpsAdminOS SMP Fri Oct 30 12:31:53 UTC 2020 
 +</code> 
 + 
 +If you have set your public SSH keys in vpsAdmin the key will be automatically deployed and you can login as root right away. To be able to login with a password you need to set the password manually after your container is created. 
 + 
 +==== Initial setup & informations ==== 
 + 
 +After installing NixOS (mainly talking about stable release) you **have to know**, that there is activated firewall by default blocking everything except ssh (port no. 22) so if you want to run some webserver (for example nginx) you have to tell firewall to not block your ports with this in your /etc/nixos/configuration.nix:nixos 
 + 
 +<code>networking.firewall.allowedTCPPorts = [ 80 443 ];</code> 
 + 
 +Then don'rt forget to do  
 + 
 +<code> nixos-rebuild switch</code> so your changes will take effect (without rebooting) 
  
 ==== Configuration ==== ==== Configuration ====
Řádek 8: Řádek 29:
  
 This can be altered to change container configuration on the fly or for next reboot. Try changing container hostname and running <code>nixos-rebuild switch</code> to build new configuration and directly switch to it. To switch to new configuration after reboot (set as a default boot profile) use <code>nixos-rebuild boot</code> This can be altered to change container configuration on the fly or for next reboot. Try changing container hostname and running <code>nixos-rebuild switch</code> to build new configuration and directly switch to it. To switch to new configuration after reboot (set as a default boot profile) use <code>nixos-rebuild boot</code>
 +
 +If you are using channels you can update your system by running <code>nixos-rebuild switch --upgrade</code>
  
 ==== Package installation ==== ==== Package installation ====
Řádek 20: Řádek 43:
  
 Consult NixOS manual for more https://nixos.org/nixos/manual/ Consult NixOS manual for more https://nixos.org/nixos/manual/
- 
-==== Common issues ==== 
- 
-=== error: while setting up the build environment: unable to load seccomp BPF program: Invalid argument === 
- 
-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: 
- 
-<code> 
-nix.package = (import (pkgs.fetchFromGitHub { 
- owner = "NixOS"; 
- repo = "nixpkgs"; 
- rev = "300fa462b31ad2106d37fcdb4b504ec60dfd62aa"; 
- sha256 = "1cbjmi34ll5xa2nafz0jlsciivj62mq78qr3zl4skgdk6scl328s"; 
-}) {}).nix; 
-</code> 
navody/distribuce/nixos.txt · Poslední úprava: 2023/12/09 14:02 autor: aither