0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/repart-image: support swap

This commit is contained in:
nikstur 2025-02-01 17:15:56 +01:00
parent 12f53ad43a
commit 8a12cae321
2 changed files with 9 additions and 0 deletions

View file

@ -81,6 +81,7 @@ let
"erofs" = [ erofs-utils ];
"btrfs" = [ btrfs-progs ];
"xfs" = [ xfsprogs ];
"swap" = [ util-linux ];
};
fileSystemTools = builtins.concatMap (f: fileSystemToolMapping."${f}") fileSystems;

View file

@ -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 = {