nixos-anywhere-example/disk-configs/simple-efi.nix

39 lines
900 B
Nix
Raw Normal View History

2023-08-08 19:48:43 +02:00
# Example to create a bios compatible gpt partition
2023-08-15 10:27:14 +02:00
{ lib, ... }: {
2023-08-08 19:48:43 +02:00
disko.devices.disk = {
one = {
2023-08-14 17:15:42 +02:00
# Change this device name match your block device.
# The `lsblk` command can help you here
2023-08-08 19:48:43 +02:00
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
2023-08-15 10:27:14 +02:00
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
2023-08-08 19:48:43 +02:00
ESP = {
2023-08-14 17:15:42 +02:00
size = "500M";
2023-08-08 19:48:43 +02:00
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
}