95 lines
2.0 KiB
Nix
95 lines
2.0 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
boot = {
|
|
name = "boot";
|
|
size = "1M";
|
|
type = "EF02";
|
|
};
|
|
|
|
esp = {
|
|
name = "ESP";
|
|
type = "EF00";
|
|
size = "1G";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = ["defaults"];
|
|
};
|
|
};
|
|
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "encrypted";
|
|
extraOpenArgs = [];
|
|
settings = {
|
|
allowDiscards = true;
|
|
bypassWorkqueues = true;
|
|
};
|
|
passwordFile = "/tmp/luks-pw";
|
|
content = {
|
|
type = "lvm_pv";
|
|
vg = "pool";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
nodev = {
|
|
"/" = {
|
|
fsType = "tmpfs";
|
|
mountOptions = [
|
|
"defaults"
|
|
"size=16G"
|
|
"mode=755"
|
|
];
|
|
};
|
|
};
|
|
|
|
lvm_vg = {
|
|
pool = {
|
|
type = "lvm_vg";
|
|
lvs = {
|
|
nix = {
|
|
size = "64G";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/nix";
|
|
mountOptions = [
|
|
"defaults"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
persist = {
|
|
size = "100%FREE";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/persist";
|
|
mountOptions = [
|
|
"defaults"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|