nixos/machines/thinkman/disko-config.nix

73 lines
1.6 KiB
Nix
Raw Normal View History

2023-11-01 17:46:37 +01:00
{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/disk/by-id/nvme-eui.0025385b01410682";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
2023-11-01 17:46:37 +01:00
};
ESP = {
size = "512M";
type = "EF00";
2023-11-01 17:46:37 +01:00
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
2024-07-28 21:08:02 +02:00
mountOptions = [ "defaults" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "encrypted";
2023-11-04 13:05:05 +01:00
settings.allowDiscards = true;
passwordFile = "/tmp/disk.key";
content = {
type = "lvm_pv";
vg = "pool";
};
2023-11-01 17:46:37 +01:00
};
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
2023-11-01 17:46:37 +01:00
};
home = {
size = "450G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
2023-11-01 17:46:37 +01:00
};
swap = {
size = "32G";
content = {
type = "swap";
resumeDevice = true;
};
2023-11-01 17:46:37 +01:00
};
};
};
};
};
}