disko/example/swap.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

{
disko.devices = {
disk = {
2024-07-19 19:17:48 +00:00
main = {
device = "/dev/vdb";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
size = "500M";
2023-07-20 16:41:35 +00:00
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
end = "-1G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
encryptedSwap = {
size = "10M";
content = {
type = "swap";
randomEncryption = true;
priority = 100; # prefer to encrypt as long as we have space for it
};
};
plainSwap = {
size = "100%";
content = {
type = "swap";
discardPolicy = "both";
2023-08-11 06:11:01 +00:00
resumeDevice = true; # resume from hiberation from this device
};
};
};
};
2022-11-05 20:17:35 +00:00
};
};
};
}