2023-07-15 18:42:37 +00:00
|
|
|
{
|
2023-03-03 07:09:13 +00:00
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
vdb = {
|
|
|
|
type = "disk";
|
2023-07-15 18:42:37 +00:00
|
|
|
device = "/dev/disk/by-diskseq/1";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
2023-07-01 17:22:31 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
|
|
|
priority = 1;
|
2023-03-03 07:09:13 +00:00
|
|
|
name = "ESP";
|
2023-07-01 17:22:31 +00:00
|
|
|
start = "1M";
|
2023-09-27 05:56:10 +00:00
|
|
|
end = "128M";
|
2023-07-20 16:41:35 +00:00
|
|
|
type = "EF00";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
2023-07-01 17:22:31 +00:00
|
|
|
};
|
|
|
|
root = {
|
|
|
|
size = "100%";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
|
|
|
type = "btrfs";
|
|
|
|
extraArgs = [ "-f" ]; # Override existing partition
|
2023-07-21 13:13:46 +00:00
|
|
|
# Subvolumes must set a mountpoint in order to be mounted,
|
|
|
|
# unless their parent is mounted
|
2023-03-03 07:09:13 +00:00
|
|
|
subvolumes = {
|
|
|
|
# Subvolume name is different from mountpoint
|
|
|
|
"/rootfs" = {
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
2023-07-21 13:13:46 +00:00
|
|
|
# Subvolume name is the same as the mountpoint
|
2023-03-03 07:09:13 +00:00
|
|
|
"/home" = {
|
|
|
|
mountOptions = [ "compress=zstd" ];
|
2023-07-21 13:13:46 +00:00
|
|
|
mountpoint = "/home";
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2023-07-21 13:13:46 +00:00
|
|
|
# Sub(sub)volume doesn't need a mountpoint as its parent is mounted
|
|
|
|
"/home/user" = { };
|
|
|
|
# Parent is not mounted so the mountpoint must be set
|
2023-03-03 07:09:13 +00:00
|
|
|
"/nix" = {
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
2023-07-21 13:13:46 +00:00
|
|
|
mountpoint = "/nix";
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2023-07-21 13:13:46 +00:00
|
|
|
# This subvolume will be created but not mounted
|
2023-03-03 07:09:13 +00:00
|
|
|
"/test" = { };
|
2023-09-12 21:03:16 +00:00
|
|
|
# Subvolume for the swapfile
|
|
|
|
"/swap" = {
|
|
|
|
mountpoint = "/.swapvol";
|
|
|
|
swap = {
|
|
|
|
swapfile.size = "20M";
|
|
|
|
swapfile2.size = "20M";
|
|
|
|
swapfile2.path = "rel-path";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mountpoint = "/partition-root";
|
|
|
|
swap = {
|
|
|
|
swapfile = {
|
|
|
|
size = "20M";
|
|
|
|
};
|
|
|
|
swapfile1 = {
|
|
|
|
size = "20M";
|
|
|
|
};
|
2022-12-17 17:09:10 +00:00
|
|
|
};
|
|
|
|
};
|
2023-07-01 17:22:31 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2022-08-25 19:46:17 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|