From cab470fdec9515fee0397e75354bc0390d1e574f Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 23 Sep 2026 21:45:05 +0800 Subject: [PATCH] =?UTF-8?q?nixos:=20=E6=8F=90=E9=AB=98=20swap=20=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 4 +++- trans.sh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index d9f2fed..11c737e 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1665,7 +1665,9 @@ Continue? if is_in_china; then mirror=https://mirror.nju.edu.cn/nix-channels else - mirror=https://nixos.org/channels + # https://nixos.org/channels 没有 ipv6 + # 且跳转到 https://channels.nixos.org + mirror=https://channels.nixos.org fi if is_use_cloud_image; then diff --git a/trans.sh b/trans.sh index e8a66de..0da722b 100644 --- a/trans.sh +++ b/trans.sh @@ -1802,7 +1802,8 @@ install_nixos() { ram_per_thread=2048 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() { echo