Skip to content

Commit

Permalink
Remove swap activation since it is not recognized by nixos-generate-c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
rake5k committed Sep 22, 2023
1 parent 7477c93 commit 3d7feaf
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/apps/nixos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,6 @@ mount_filesystems() {
findmnt --real
}

enable_swap() {
local swap_dir="${MOUNT_ROOT}/swap"
local swap_file="${swap_dir}/swapfile"

_log "[enable_swap] Creating swap file..."
btrfs filesystem mkswapfile --size 4G "${swap_file}"

_log "[enable_swap] Enabling swap..."
swapon "${swap_file}"

_log "[enable_swap] Enabled swaps:"
cat /proc/swaps
}

install() {
_log "[install] Installing NixOS..."
nixos-install --root "${MOUNT_ROOT}" --flake "${FLAKE}#${HOSTNAME}" --impure
Expand Down Expand Up @@ -198,7 +184,6 @@ echo '18'
# shellcheck disable=SC2310
if _read_boolean "Do you want to INSTALL NixOS now?" N; then
mount_filesystems
enable_swap
install
fi

0 comments on commit 3d7feaf

Please sign in to comment.