From 19582674abb689629a00da038a8c86eee3a8a446 Mon Sep 17 00:00:00 2001
From: makefu <github@syntax-fehler.de>
Date: Mon, 12 Jun 2023 21:05:04 +0200
Subject: [PATCH] fs: add disko single-disk partitioning

---
 2configs/fs/disko/single-disk-bcachefs.nix | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 2configs/fs/disko/single-disk-bcachefs.nix

diff --git a/2configs/fs/disko/single-disk-bcachefs.nix b/2configs/fs/disko/single-disk-bcachefs.nix
new file mode 100644
index 0000000..cd73afd
--- /dev/null
+++ b/2configs/fs/disko/single-disk-bcachefs.nix
@@ -0,0 +1,38 @@
+{ disks ? [ "/dev/sda" ], ... }: {
+  disko.devices = {
+    disk = {
+      vdb = {
+        device = builtins.elemAt disks 0;
+        type = "disk";
+        content = {
+          type = "table";
+          format = "gpt";
+          partitions = [
+            {
+              name = "ESP";
+              start = "1MiB";
+              end = "500MiB";
+              bootable = true;
+              content = {
+                type = "filesystem";
+                format = "vfat";
+                mountpoint = "/boot";
+              };
+            }
+            {
+              name = "root";
+              start = "500MiB";
+              end = "100%";
+              part-type = "primary";
+              content = {
+                type = "filesystem";
+                format = "bcachefs";
+                mountpoint = "/";
+              };
+            }
+          ];
+        };
+      };
+    };
+  };
+}