diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index de6e43dd30d8..a77a6ed52ebb 100755 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -655,7 +655,7 @@ foreach my $device (keys(%{$cur_swaps})) { # "systemctl stop" here because systemd has lots of alias # units that prevent a stop from actually calling # "swapoff". - if ($action ne "dry-activate") { + if ($action eq "dry-activate") { print STDERR "would stop swap device: $device\n"; } else { print STDERR "stopping swap device: $device\n";