diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix index 7d6109f212ac..e129e496fe36 100644 --- a/nixos/modules/virtualisation/amazon-image.nix +++ b/nixos/modules/virtualisation/amazon-image.nix @@ -172,7 +172,7 @@ in boot.initrd.extraUtilsCommands = '' # We need swapon in the initrd. - cp ${pkgs.utillinux}/sbin/swapon $out/bin + cp --remove-destination ${pkgs.utillinux}/sbin/swapon $out/bin ''; # Don't put old configurations in the GRUB menu. The user has no