nixos: 修复超过 2g 内存时无法安装

This commit is contained in:
bin456789 2024-11-26 21:20:10 +08:00
parent 1461a9bd0f
commit 0693dbbc64
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -1331,7 +1331,9 @@ install_nixos() {
# 挂载分区,创建 swapfile
mount_part_basic_layout /os /os/efi
create_swap $swap_size /os/swapfile
if [ "$swap_size" -gt 0 ]; then
create_swap "$swap_size" /os/swapfile
fi
# 步骤
# 1. 安装 nix (nix-xxx)