From b3875afc1f324ce2a32c7d211a0c20606f37de20 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 2 Feb 2023 13:27:25 +0100 Subject: [PATCH] examples: add hybrid.nix --- example/hybrid.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 example/hybrid.nix diff --git a/example/hybrid.nix b/example/hybrid.nix new file mode 100644 index 0000000..061fa1e --- /dev/null +++ b/example/hybrid.nix @@ -0,0 +1,46 @@ +{ disk, ... }: +{ + disk = { + main = { + type = "disk"; + device = disk; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "boot"; + type = "partition"; + start = "0"; + end = "1M"; + flags = ["bios_grub"]; + } + { + type = "partition"; + name = "ESP"; + start = "1M"; + end = "512M"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + type = "partition"; + name = "root"; + start = "512M"; + end = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; + }; +} +