2024-03-03 12:15:40 +01:00
|
|
|
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
2024-03-02 16:30:57 +01:00
|
|
|
disko.devices = {
|
|
|
|
disk.main = {
|
2024-03-03 12:15:40 +01:00
|
|
|
inherit device;
|
2024-03-02 16:30:57 +01:00
|
|
|
type = "disk";
|
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
boot = {
|
|
|
|
name = "boot";
|
|
|
|
size = "1M";
|
|
|
|
type = "EF02";
|
|
|
|
};
|
|
|
|
esp = {
|
|
|
|
name = "ESP";
|
|
|
|
size = "500M";
|
|
|
|
type = "EF00";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
2024-03-02 18:26:52 +01:00
|
|
|
mountOptions = ["umask=0077"];
|
2024-03-02 16:30:57 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
swap = {
|
|
|
|
size = "4G";
|
|
|
|
content = {
|
|
|
|
type = "swap";
|
|
|
|
resumeDevice = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
name = "root";
|
|
|
|
size = "100%";
|
|
|
|
content = {
|
|
|
|
type = "lvm_pv";
|
|
|
|
vg = "root_vg";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lvm_vg = {
|
|
|
|
root_vg = {
|
|
|
|
type = "lvm_vg";
|
|
|
|
lvs = {
|
|
|
|
root = {
|
|
|
|
size = "100%FREE";
|
|
|
|
content = {
|
|
|
|
type = "btrfs";
|
|
|
|
extraArgs = ["-f"];
|
|
|
|
|
|
|
|
subvolumes = {
|
|
|
|
"/root" = {
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/home" = {
|
|
|
|
mountOptions = ["compress=zstd"];
|
|
|
|
mountpoint = "/home";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/nix" = {
|
|
|
|
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
|
|
|
mountpoint = "/nix";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|