nix profile 全局安全
推荐多用户模式安装
sh <(curl -L https://mirror.nju.edu.cn/nix/nix-2.34.8/install) --daemon
daemon重启命令: sudo systemctl daemon-reload && sudo systemctl restart nix-daemon
sudo systemctl daemon-reload && sudo systemctl restart nix-daemon
/etc/nix/nix.conf
experimental-features = nix-command flakes substituters = https://mirror.sjtu.edu.cn/nix-channels/store https://cache.nixos.org/ flake-registry = /home/paper/flakes/flake-registry.json
nix-channel --add https://mirror.nju.edu.cn/nix-channels/nixpkgs-26.05-darwin nixpkgs
nix-channel --update
nix registry add templates git+https://gitlink.org.cn/xmng/nixos-templates.git
nix registry add nixpkgs https://mirrors.nju.edu.cn/nix-channels/nixpkgs-25.05-darwin/nixexprs.tar.xz
nix registry list
查看可清理:nix store gc --dry-run
nix store gc --dry-run
清理:nix store gc
nix store gc
/nix/store的重复文件:nix store optimise
nix store optimise
查看store大小:du -sh /nix/store
du -sh /nix/store
nix flake check
nix develop
nix flake show
nix flake metadata
nix profile add nixpkgs#devbox
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
flakes
安装 nix
conf
channel
flake
store
nix flake
profile