69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
device = "/dev/disk/by-path/pci-0000:01:00.0-nvme-1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
nvme_luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "nvme_crypted";
|
|
extraOpenArgs = [ ];
|
|
settings = {
|
|
# if you want to use the key for interactive login be sure there is no trailing newline
|
|
# for example use `echo -n "password" > /tmp/secret.key`
|
|
#keyFile = "/tmp/secret.key";
|
|
allowDiscards = true;
|
|
};
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "nvme_pool";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
lvm_vg = {
|
|
nvme_pool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
nvme_swap = {
|
|
size = "32G";
|
|
content = {
|
|
type = "swap";
|
|
discardPolicy = "both";
|
|
resumeDevice = true; # resume from hiberation from this device
|
|
};
|
|
};
|
|
nvme_root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|