Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

安装 Nix

Bootstrap 基于 Nix 包管理器,首先需要安装 Nix。

官方安装脚本

sh <(curl -L https://nixos.org/nix/install) --daemon

安装完成后,重启终端或运行:

. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

验证安装

nix --version

启用 Flakes

Bootstrap 使用 Flakes,需要确保已启用:

mkdir -p ~/.config/nix
cat > ~/.config/nix/nix.conf << 'CONF'
experimental-features = nix-command flakes
CONF

下一步