作用:引入了一种管理 Nix 表达式之间的依赖关系的策略, 提高了 Nix 生态系统中的可复现性、可组合性和可用性。
flake.nix flake.lock
nix-command
Flakes 依赖 nix-command
(New CLI).
nix-channel
-> 在flake.nix
中inputs
声明依赖包的数据源。 -> 通过flake.lock
锁定依赖版本.nix-env
用户环境的软件包 ->nix profile
.nix-shell
临时的 shell 环境 ->nix develop
,nix shell
,nix run
.nix-build
->nix build
.nix-collect-garbage
nix store gc --debug