diff --git a/nixos-infect b/nixos-infect index 650430e..c9c4ea6 100755 --- a/nixos-infect +++ b/nixos-infect @@ -310,10 +310,14 @@ infect() { checkEnv prepareEnv -makeSwap # smallest (512MB) droplet needs extra memory! +if [[ -z "$NO_SWAP" ]]; then + makeSwap # smallest (512MB) droplet needs extra memory! +fi makeConf infect -removeSwap +if [[ -z "$NO_SWAP" ]]; then + removeSwap +fi if [[ -z "$NO_REBOOT" ]]; then reboot