nixos/hosts/common/disks/std-disk-config.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

2024-05-14 14:51:09 +01:00
{
disko.devices = {
disk = {
#FIXME change to proper device or make dynamic like figdetingbits
vda = {
2024-05-14 14:51:09 +01:00
type = "disk";
# FIXME change to proper device or make dynamic like figdetingbits
device = "/dev/vda";
2024-05-14 14:51:09 +01:00
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "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 = {
"/root" = {
mountpoint = "/";
};
"/persist" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/persist";
};
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
"/swap" = {
mountOptions = [ "noatime" ];
mountpoint = "/.swapvol";
swap.swapfile.size = "8192M";
};
};
};
};
};
};
};
};
};
}