mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
help: nix: use new configuration API
This commit is contained in:
parent
d0d5dfdb1d
commit
79d20fa5b1
|
|
@ -45,16 +45,10 @@ Binary cache 的镜像位于 <https://{{ site.hostname }}/nix-channels/store>,
|
|||
substituters = https://{{ site.hostname }}/nix-channels/store https://cache.nixos.org/
|
||||
```
|
||||
|
||||
- NixOS 和 nix-darwin 在 `configuration.nix` 中使用如下配置:
|
||||
- NixOS 和 nix-darwin 在 `configuration.nix` 中使用如下配置(https://cache.nixos.org 会被自动添加):
|
||||
|
||||
```nix
|
||||
nix.binaryCaches = [ "https://{{ site.hostname }}/nix-channels/store" "https://cache.nixos.org/" ];
|
||||
```
|
||||
|
||||
- NixOS 19.09 及以后版本和 nix-darwin 中系统会自动配置备选源站,也可用如下配置,同样在 `configuration.nix`:
|
||||
|
||||
```nix
|
||||
nix.binaryCaches = [ "https://{{ site.hostname }}/nix-channels/store" ];
|
||||
nix.settings.substituters = [ "https://{{ site.hostname }}/nix-channels/store" ];
|
||||
```
|
||||
|
||||
### Nixpkgs channel
|
||||
|
|
|
|||
Loading…
Reference in New Issue