From ff7fa8760096e3f00a2515b35a1432237f104280 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 3 Dec 2022 12:08:19 +0100 Subject: add nodev support (for tmpfs, ramfs, nfs) --- example/tmpfs.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 example/tmpfs.nix (limited to 'example') 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" + ]; + }; + }; +} + -- cgit v1.2.3