disko/example/btrfs-subvolumes.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/disk/by-diskseq/1";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "128MiB";
2023-07-20 19:41:35 +03:00
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
subvolumes = {
# Subvolume name is different from mountpoint
"/rootfs" = {
mountpoint = "/";
};
# Mountpoints inferred from subvolume name
"/home" = {
mountOptions = [ "compress=zstd" ];
};
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
};
"/test" = { };
2022-12-17 20:09:10 +03:00
};
};
};
};
};
};
2022-08-25 22:46:17 +03:00
};
};
}