mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-25 21:30:52 +01:00
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{
|
|
devices = {
|
|
disk = {
|
|
sda = {
|
|
type = "disk";
|
|
device = "/dev/sda";
|
|
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
|
|
"/root" = {
|
|
mountpoint = "/";
|
|
};
|
|
# Subvolume name is the same as the mountpoint
|
|
"/persistent" = {
|
|
mountpoint = "/persistent";
|
|
};
|
|
"/nix" = {
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
mountpoint = "/nix";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|