summaryrefslogtreecommitdiffstats
path: root/example/config-gpt-bios.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2022-08-17 17:52:12 +0200
committerJörg Thalheim <joerg@thalheim.io>2022-08-19 09:52:12 +0200
commitfc568cf797fdc4a726e2d961aa41d0dad1bbd004 (patch)
tree604ac9dbbe507598caf37e4cfb9a7536235b6501 /example/config-gpt-bios.nix
parentc40b0dc031f3cb32e86bff1f83760a75fa5c5b44 (diff)
add flag support
Diffstat (limited to 'example/config-gpt-bios.nix')
-rw-r--r--example/config-gpt-bios.nix33
1 files changed, 33 insertions, 0 deletions
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 = "/";
+ };
+ }
+ ];
+ };
+ };
+}