mirror of
https://github.com/bin456789/reinstall.git
synced 2026-10-04 14:37:45 +08:00
nixos: 提高 swap 并修改镜像源
This commit is contained in:
+3
-1
@@ -1665,7 +1665,9 @@ Continue?
|
|||||||
if is_in_china; then
|
if is_in_china; then
|
||||||
mirror=https://mirror.nju.edu.cn/nix-channels
|
mirror=https://mirror.nju.edu.cn/nix-channels
|
||||||
else
|
else
|
||||||
mirror=https://nixos.org/channels
|
# https://nixos.org/channels 没有 ipv6
|
||||||
|
# 且跳转到 https://channels.nixos.org
|
||||||
|
mirror=https://channels.nixos.org
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_use_cloud_image; then
|
if is_use_cloud_image; then
|
||||||
|
|||||||
@@ -1802,7 +1802,8 @@ install_nixos() {
|
|||||||
ram_per_thread=2048
|
ram_per_thread=2048
|
||||||
|
|
||||||
threads=$(get_build_threads $ram_per_thread)
|
threads=$(get_build_threads $ram_per_thread)
|
||||||
swap_size=$(get_need_swap_size $ram_per_thread)
|
# 最少需要的总内存 = 1 个编译线程所需的内存 + Alpine Live OS 所需的内存 (512M)
|
||||||
|
swap_size=$(get_need_swap_size $((ram_per_thread + 512)))
|
||||||
|
|
||||||
show_nixos_config() {
|
show_nixos_config() {
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user