snowfield/machines/gustave/disko.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2024-04-05 00:34:14 +02:00
{
devices = {
disk = {
sda = {
type = "disk";
2024-05-09 00:52:39 +02:00
device = "/dev/sda";
2024-04-05 00:34:14 +02:00
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
2024-05-09 00:52:39 +02:00
"/root" = {
2024-04-05 00:34:14 +02:00
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/persistent" = {
mountpoint = "/persistent";
};
"/nix" = {
2024-05-09 00:52:39 +02:00
mountOptions = [
"compress=zstd"
"noatime"
];
2024-04-05 00:34:14 +02:00
mountpoint = "/nix";
};
};
};
};
};
};
};
};
};
}