Files
nix-config/systems/amd-server-vpn-vm/disk-config.nix
2025-10-30 21:59:31 +01:00

43 lines
960 B
Nix

# Example to create a bios compatible gpt partition
{ lib, ... }:
{
disko.devices = {
disk.main = {
device = lib.mkDefault "/dev/vda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
}