77 lines
2.3 KiB
Nix
77 lines
2.3 KiB
Nix
# ── buildbox disk layout ────────────────────────────────────────
|
|
# QEMU VM: Btrfs with subvolumes for snapshot-capable root, home,
|
|
# nix store, logs, and snapshot directory.
|
|
#
|
|
# Run from rescue ISO:
|
|
# disko --mode disko /etc/disko-config.nix
|
|
{
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
device = "/dev/sda";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
# GRUB's core.img lives here on GPT/BIOS systems (GPT leaves no
|
|
# gap after the MBR, so grub-install needs an EF02 partition).
|
|
# Not mounted; grub-install writes the boot code directly.
|
|
boot = {
|
|
size = "1M";
|
|
type = "EF02";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "empty";
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = ["-f"];
|
|
subvolumes = {
|
|
"/root" = {
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/var-log" = {
|
|
mountpoint = "/var/log";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/snapshots" = {
|
|
mountpoint = "/.snapshots";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|