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/14 03:04] – mention future seccomp config option jtojnarnavody:distribuce:nixos [2018/10/27 10:29] – use vpsAdminOS template, mark openvz template as unsupported rmarko
Řádek 1: Řádek 1:
 ===== 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 choose **[vpsAdminOS] NixOS** template.  
 + 
 +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.
  
 ==== Configuration ==== ==== Configuration ====
Řádek 8: Řádek 12:
  
 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 26:
  
 Consult NixOS manual for more https://nixos.org/nixos/manual/ Consult NixOS manual for more https://nixos.org/nixos/manual/
 +
 +
 +===== Legacy OpenVZ templates =====
 +
 +<note important>Due to compatibility issues with OpenVZ it is no longer recommended to use the old infrastructure for new deployments.</note>
  
 ==== Common issues ==== ==== Common issues ====
 +
 +=== SSH public key deployment fails ===
 +
 +This can occur on first boot of the template when there's no ''/root'' yet. Disable automatic key deployment and deploy key manually **after** the containers boot.
  
 === error: while setting up the build environment: unable to load seccomp BPF program: Invalid argument === === error: while setting up the build environment: unable to load seccomp BPF program: Invalid argument ===
Řádek 28: Řádek 43:
  
 <code> <code>
-nix.package = (import (pkgs.fetchFromGitHub {+    nix.package = (import (pkgs.fetchFromGitHub {
  owner = "NixOS";  owner = "NixOS";
  repo = "nixpkgs";  repo = "nixpkgs";
  rev = "300fa462b31ad2106d37fcdb4b504ec60dfd62aa";  rev = "300fa462b31ad2106d37fcdb4b504ec60dfd62aa";
  sha256 = "1cbjmi34ll5xa2nafz0jlsciivj62mq78qr3zl4skgdk6scl328s";  sha256 = "1cbjmi34ll5xa2nafz0jlsciivj62mq78qr3zl4skgdk6scl328s";
-}) {}).nix;+    }) {}).nix;
 </code> </code>
  
 In the future, it will be possible to [[https://github.com/NixOS/nix/commit/1dd29d7aebae706f3e90a18bbfae727f2ed03c70|disable seccomp usage]]. In the future, it will be possible to [[https://github.com/NixOS/nix/commit/1dd29d7aebae706f3e90a18bbfae727f2ed03c70|disable seccomp usage]].
 +
 +=== systemd 233+ compatibility issues ===
 +
 +Causes boot failures, workaround is pinning systemd to version 232:
 +<code>
 +    nixpkgs.config.packageOverrides = super: 
 + let systemdGperfCompat = super.systemd.override { gperf = super.gperf_3_0; };
 + in {
 +          systemd = systemdGperfCompat.overrideAttrs ( oldAttrs: rec {
 +            version = "232";
 +            name = "systemd-${version}";
 +            src = pkgs.fetchFromGitHub {
 +              owner = "nixos";
 +              repo = "systemd";
 +              rev = "66e778e851440fde7f20cff0c24d23538144be8d";
 +              sha256 = "1valz8v2q4cj0ipz2b6mh5p0rjxpy3m88gg9xa2rcc4gcmscndzk";
 +            };
 +          });
 +    };
 +</code>
 +
 +==== Details ====
 +
 +Log contents
 +<code>
 +Failed to canonicalize path /etc/systemd/system/local-fs.target.d: Too many levels of symbolic links
 +
 +$ journalctl -o verbose
 +    _EXE=/nix/store/n5ksbh1hx275zfbqbalhghzpxp1w73lf-systemd-234/lib/systemd/systemd
 +    _CMDLINE=/run/current-system/systemd/lib/systemd/systemd --system --deserialize 19
 +    CODE_FILE=src/shared/dropin.c
 +    CODE_LINE=133
 +    CODE_FUNC=unit_file_find_dir
 +    ERRNO=40
 +    MESSAGE=Failed to canonicalize path /etc/systemd/system/local-fs.target.d: Too many levels of symbolic links
navody/distribuce/nixos.txt · Poslední úprava: 2023/12/09 14:02 autor: aither