summaryrefslogtreecommitdiffstats
path: root/example/simple-efi.nix
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2022-11-09 13:26:43 +0100
committerGitHub <noreply@github.com>2022-11-09 13:26:43 +0100
commit45ef21831ee493de5efa97f48f1c31ca9dd54764 (patch)
treed4efbdf4713aa4428a4922c0389ca4c61c808b9e /example/simple-efi.nix
parentc96ccd7d9fb48b8283e84811c2355a3c39bb2a52 (diff)
parent0af2a7c206bd69ecdc01361e12c7cb0ec9820911 (diff)
Merge pull request #48 from nix-community/module
Diffstat (limited to 'example/simple-efi.nix')
-rw-r--r--example/simple-efi.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/example/simple-efi.nix b/example/simple-efi.nix
new file mode 100644
index 0000000..c69c847
--- /dev/null
+++ b/example/simple-efi.nix
@@ -0,0 +1,40 @@
+{ disks ? [ "/dev/vdb" ], ... }: {
+ disk = {
+ vdb = {
+ device = builtins.elemAt disks 0;
+ type = "disk";
+ content = {
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ type = "partition";
+ name = "ESP";
+ start = "1MiB";
+ end = "100MiB";
+ bootable = true;
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ }
+ {
+ name = "root";
+ type = "partition";
+ start = "100MiB";
+ end = "100%";
+ part-type = "primary";
+ bootable = true;
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
+ };
+ }
+ ];
+ };
+ };
+ };
+}
+