From fc568cf797fdc4a726e2d961aa41d0dad1bbd004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 17 Aug 2022 17:52:12 +0200 Subject: add flag support --- example/config-gpt-bios.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 example/config-gpt-bios.nix (limited to 'example/config-gpt-bios.nix') diff --git a/example/config-gpt-bios.nix b/example/config-gpt-bios.nix new file mode 100644 index 0000000..9dfcffa --- /dev/null +++ b/example/config-gpt-bios.nix @@ -0,0 +1,33 @@ +# Example to create a bios compatible gpt partition +{ + type = "devices"; + content = { + sda = { + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + start = "0"; + end = "1M"; + part-type = "primary"; + flags = ["bios_grub"]; + content.type = "noop"; + } + { + type = "partition"; + # leave space for the grub aka BIOS boot + start = "1M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; +} -- cgit v1.2.3