差異處
這裏顯示兩個版本的差異處。
下次修改 | 前次修改 | ||
nix [2017/01/09 04:34] jz 建立 |
nix [2017/05/28 19:12] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
====== Nix ====== | ====== Nix ====== | ||
- | ===== select channel ===== | + | ===== Select channel ===== |
<code bash> | <code bash> | ||
行 7: | 行 7: | ||
nix-channel --update | nix-channel --update | ||
</code> | </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 |