diff options
author | Lassulus <github@lassul.us> | 2022-12-04 13:21:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-04 13:21:42 +0100 |
commit | c2bf0b6314b4bc48177e1064d9814e410bccc8f2 (patch) | |
tree | 4e13cb302f61742482e9bf10471d2146c9e8990a /example | |
parent | dfb7bd89e1e4a49d880fa8348e56251db1e32915 (diff) | |
parent | ff7fa8760096e3f00a2515b35a1432237f104280 (diff) |
Merge pull request #70 from nix-community/tmpfs
Diffstat (limited to 'example')
-rw-r--r-- | example/tmpfs.nix | 48 |
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" + ]; + }; + }; +} + |