nix-config/hosts/Anton/disko.nix
2024-07-27 23:25:56 +02:00

53 lines
1.6 KiB
Nix

{
disko.devices = {
disk = {
root-drive = {
type = "disk";
device = "/dev/disk/by-id/nvme-Patriot_M.2_P300_128GB_P300HHBB240118004095";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
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
"/rootfs" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/home";
};
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
};
}