mirror of
https://github.com/nix-community/disko.git
synced 2024-09-10 22:15:54 +03:00
This just forwards to the underlying NixOS option and expands the mount script to exhibit the same behavior.
49 lines
1.2 KiB
Nix
49 lines
1.2 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;
|
|
priority = 100; # prefer to encrypt as long as we have space for it
|
|
};
|
|
};
|
|
plainSwap = {
|
|
size = "100%";
|
|
content = {
|
|
type = "swap";
|
|
discardPolicy = "both";
|
|
resumeDevice = true; # resume from hiberation from this device
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|