summaryrefslogtreecommitdiffstats
path: root/example/zfs.nix
blob: e3442891f9f0cdf12582c296962ab24e74478bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  type = "devices";
  content = {
    vdb = {
      type = "zfs";
      pool = "zroot";
    };
    vdc = {
      type = "zfs";
      pool = "zroot";
    };
    zroot = {
      type = "zpool";
      mode = "mirror";
      datasets = [
        {
          type = "zfs_filesystem";
          name = "zfs_fs";
          mountpoint = "/zfs_fs";
        }
        {
          type = "zfs_filesystem";
          name = "zfs_legacy_fs";
          options.mountpoint = "legacy";
          mountpoint = "/zfs_legacy_fs";
        }
        {
          type = "zfs_volume";
          name = "zfs_testvolume";
          size = "10M";
          content = {
            type = "filesystem";
            format = "ext4";
            mountpoint = "/ext4onzfs";
          };
        }
      ];
    };
  };
}