main
nix 73 lines 1.25 KB
Raw
1 let
2 partitions = {
3 grub = {
4 priority = 1;
5 start = "0";
6 end = "1M";
7 type = "EF02";
8 };
9 boot = {
10 priority = 2;
11 name = "boot";
12 start = "1M";
13 end = "1G";
14 content = {
15 type = "filesystem";
16 format = "vfat";
17 };
18 };
19 root = {
20 priority = 3;
21 start = "1G";
22 end = "100%";
23 content = {
24 type = "zfs";
25 pool = "zroot";
26 };
27 };
28 };
29 in
30 {
31 disk = {
32 nvme0n1 = {
33 type = "disk";
34 device = "/dev/nvme0n1";
35 content = {
36 type = "gpt";
37 inherit partitions;
38 };
39 };
40 nvme1n1 = {
41 type = "disk";
42 device = "/dev/nvme1n1";
43 content = {
44 type = "gpt";
45 inherit partitions;
46 };
47 };
48 };
49
50 zpool = {
51 zroot = {
52 type = "zpool";
53 mode = "mirror";
54 rootFsOptions = {
55 compression = "lz4";
56 "com.sun:auto-snapshot" = "true";
57 mountpoint = "none";
58 };
59 datasets = {
60 "root" = {
61 type = "zfs_fs";
62 options.mountpoint = "none";
63 mountpoint = null;
64 };
65 "root/nixos" = {
66 type = "zfs_fs";
67 options.mountpoint = "/";
68 mountpoint = "/";
69 };
70 };
71 };
72 };
73 }