diff --git a/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix index 5669cd8826e4..e8924ec8519d 100644 --- a/nixos/modules/image/repart-image.nix +++ b/nixos/modules/image/repart-image.nix @@ -81,6 +81,7 @@ let "erofs" = [ erofs-utils ]; "btrfs" = [ btrfs-progs ]; "xfs" = [ xfsprogs ]; + "swap" = [ util-linux ]; }; fileSystemTools = builtins.concatMap (f: fileSystemToolMapping."${f}") fileSystems; diff --git a/nixos/tests/appliance-repart-image.nix b/nixos/tests/appliance-repart-image.nix index 9798ab4e79fa..11447cf8fa03 100644 --- a/nixos/tests/appliance-repart-image.nix +++ b/nixos/tests/appliance-repart-image.nix @@ -73,6 +73,14 @@ in SizeMinBytes = if config.nixpkgs.hostPlatform.isx86_64 then "64M" else "96M"; }; }; + "swap" = { + repartConfig = { + Type = "swap"; + Format = "swap"; + SizeMinBytes = "10M"; + SizeMaxBytes = "10M"; + }; + }; "root" = { storePaths = [ config.system.build.toplevel ]; repartConfig = {