Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revizePředchozí verzeNásledující verze | Předchozí verzeNásledující verzeObě strany příští revize | ||
navody:distribuce:nixos [2017/10/31 08:48] – [Common issues] ssh, systemd232/233 rmarko | navody:distribuce:nixos [2022/02/13 17:40] – page id Aither | ||
---|---|---|---|
Řá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. |
- | ==== Configuration ==== | + | To start using NixOS on vpsFree.cz, make sure you're on a node with [[navody: |
- | Configuration is available at < | + | < |
+ | # uname -rv | ||
+ | 5.9.2 # | ||
+ | </ | ||
- | This can be altered | + | 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 |
- | ==== Package installation | + | ==== Initial setup & informations |
- | Packages can be installed system wide via configuration.nix or for local profile via < | + | 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/ |
- | To install vim use < | + | < |
- | To search for a package use < | + | Then don'rt forget to do |
- | ==== Manual ==== | + | < |
- | Consult NixOS manual for more https:// | ||
- | ==== Common issues | + | ==== Configuration |
- | === SSH public key deployment fails === | + | Configuration is available at < |
- | This can occur on first boot of the template when there' | + | This can be altered to change container configuration |
- | === error: while setting up the build environment: | + | If you are using channels you can update your system by running < |
- | 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 '' | + | ==== Package installation ==== |
- | < | + | Packages can be installed system wide via configuration.nix or for local profile via < |
- | nix.package = (import (pkgs.fetchFromGitHub { | + | |
- | owner = " | + | |
- | repo = " | + | |
- | rev = " | + | |
- | sha256 = " | + | |
- | }) {}).nix; | + | |
- | </ | + | |
- | In the future, it will be possible to [[https:// | + | To install vim use < |
- | === systemd 233+ compatibility issues === | + | To search for a package use < |
- | Causes boot failures, workaround is pinning systemd to version 232: | + | ==== Manual |
- | < | + | |
- | nixpkgs.config.packageOverrides | + | |
- | let systemdGperfCompat | + | |
- | in { | + | |
- | systemd | + | |
- | version | + | |
- | name = " | + | |
- | src = pkgs.fetchFromGitHub { | + | |
- | owner = " | + | |
- | repo = " | + | |
- | rev = " | + | |
- | sha256 = " | + | |
- | }; | + | |
- | }); | + | |
- | }; | + | |
- | </ | + | |
- | ==== Details ==== | + | Consult NixOS manual for more https://nixos.org/nixos/manual/ |
- | + | ||
- | Log contents | + | |
- | < | + | |
- | Failed to canonicalize path / | + | |
- | + | ||
- | $ journalctl -o verbose | + | |
- | _EXE=/nix/store/ | + | |
- | _CMDLINE=/ | + | |
- | CODE_FILE=src/ | + | |
- | CODE_LINE=133 | + | |
- | CODE_FUNC=unit_file_find_dir | + | |
- | ERRNO=40 | + | |
- | MESSAGE=Failed to canonicalize path /etc/systemd/ | + | |
- | + | ||
- | $ # strace output | + | |
- | open("/ | + | |
- | readlinkat(AT_FDCWD, | + | |
- | open("/ | + | |
- | fcntl(12, F_GETFL) | + | |
- | fstat(12, {st_mode=S_IFREG|0444, | + | |
- | fstat(12, {st_mode=S_IFREG|0444, | + | |
- | getpid() | + | |
- | fstat(12, {st_mode=S_IFREG|0444, | + | |
- | read(12, "# | + | |
- | open("/ | + | |
- | read(13, " | + | |
- | close(13) | + | |
- | read(12, "", | + | |
- | close(12) | + | |
- | open("/", | + | |
- | openat(12, " | + | |
- | fstat(13, {st_mode=S_IFDIR|0755, | + | |
- | close(12) | + | |
- | openat(13, " | + | |
- | fstat(12, {st_mode=S_IFDIR|0755, | + | |
- | close(13) | + | |
- | openat(12, " | + | |
- | close(12) | + | |
- | writev(3, [{" | + | |
- | open("/", | + | |
- | openat(12, " | + | |
- | fstat(13, {st_mode=S_IFDIR|0755, | + | |
- | close(12) | + | |
- | openat(13, " | + | |
- | fstat(12, {st_mode=S_IFDIR|0755, | + | |
- | close(13) | + | |
- | openat(12, " | + | |
- | close(12) | + | |
- | writev(3, [{" | + | |
- | open("/ | + | |
- | readlinkat(AT_FDCWD, | + | |
- | open("/ | + | |
- | fcntl(12, F_GETFL) | + | |
- | </code> | + |