summaryrefslogtreecommitdiffstats
path: root/example/tmpfs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'example/tmpfs.nix')
-rw-r--r--example/tmpfs.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/example/tmpfs.nix b/example/tmpfs.nix
new file mode 100644
index 0000000..fb45f8a
--- /dev/null
+++ b/example/tmpfs.nix
@@ -0,0 +1,48 @@
+{ 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 = "/";
+ };
+ }
+ ];
+ };
+ };
+ };
+ nodev = {
+ "/tmp" = {
+ fsType = "tmpfs";
+ mountOptions = [
+ "size=200M"
+ ];
+ };
+ };
+}
+