顯示頁面 舊版 反向連結 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== Nix ====== ===== Select channel ===== <code bash> nix-channel --add https://nixos.org/channels/nixpkgs-unstable nix-channel --update </code> ===== Search package ===== <code bash> nix-env -qa PACKAGE_NAME # or use nox, install with nix-env -iA nox nox PACKAGE_NAME </code> ===== Install package ===== <code bash> nix-env -i PACKAGE_NAME </code> ===== Remove package ===== <code bash> nix-env -e PACKAGE_NAME # same as nix-env --uninstall PACKAGE_NAME </code> ===== Garbage collection ===== <code bash> nix-collect-garbage -d </code> ===== List installed package ===== <code bash> nix-env -q </code> ===== Rebuild ===== <code bash> vi /etc/nixos/configuration.nix nixos-rebuild switch nix-env --list-generations </code> **ref:** http://nixos.org/nix/manual/#chap-quick-start https://nixos.org/wiki/Cheatsheet https://distrowatch.com/dwres.php?resource=package-management