disko/example/swap.nix
Jörg Thalheim 3cb78c93e6 swap: don't activate random encrypted swap files
This requires more code and is not implemented just now.
2023-11-25 15:47:29 +00:00

46 lines
1.1 KiB
Nix

{
disko.devices = {
disk = {
vdb = {
device = "/dev/vdb";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
size = "500M";
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;
};
};
plainSwap = {
size = "100%";
content = {
type = "swap";
resumeDevice = true; # resume from hiberation from this device
};
};
};
};
};
};
};
}