Enable Swap for NixOS Installation Medium

I would like to enable a swap file for the Nixos installation medium, not the real system which I want to build.
I only have 8GB of RAM and need more memory to build the system from scratch.
Is this even possible?
Can I enable swap without rebooting the system on the usb drive?

Make a swap partition and swapon it.
I doubt it will solve your underlying problem of too-low memory, though; you’re better off reducing the number of jobs/cores.

1 Like

Thank you for the helpful reply.
I just found out, that I don’t need to reboot the system to enable a swap file.
The Arch Wiki helped a lot. Swap - ArchWiki

The installation worked and swap is now set via disko permanently :+1:.

1 Like