|
1 | 1 | {config, ...}: {
|
2 |
| - disko.devices = { |
3 |
| - disk.primary = { |
4 |
| - type = "disk"; |
5 |
| - device = "/dev/vda"; |
6 |
| - content = { |
7 |
| - type = "gpt"; |
8 |
| - partitions = { |
9 |
| - ESP = { |
10 |
| - size = "512M"; |
11 |
| - type = "EF00"; |
12 |
| - label = "BOOT"; |
13 |
| - content = { |
14 |
| - type = "filesystem"; |
15 |
| - format = "vfat"; |
16 |
| - mountpoint = "/boot"; |
17 |
| - }; |
| 2 | + disko.devices.disk.primary = { |
| 3 | + type = "disk"; |
| 4 | + device = "/dev/vda"; |
| 5 | + |
| 6 | + content = { |
| 7 | + type = "gpt"; |
| 8 | + |
| 9 | + partitions = { |
| 10 | + ESP = { |
| 11 | + size = "512M"; |
| 12 | + type = "EF00"; |
| 13 | + label = "boot"; |
| 14 | + |
| 15 | + content = { |
| 16 | + type = "filesystem"; |
| 17 | + format = "vfat"; |
| 18 | + mountpoint = "/boot"; |
18 | 19 | };
|
| 20 | + }; |
19 | 21 |
|
20 |
| - root = { |
21 |
| - size = "100%"; |
22 |
| - label = "root"; |
| 22 | + root = { |
| 23 | + size = "100%"; |
| 24 | + label = "root"; |
23 | 25 |
|
24 |
| - content = { |
25 |
| - type = "zfs"; |
26 |
| - pool = config.host.name; |
27 |
| - }; |
| 26 | + content = { |
| 27 | + type = "zfs"; |
| 28 | + pool = config.host.name; |
28 | 29 | };
|
29 | 30 | };
|
30 | 31 | };
|
31 | 32 | };
|
| 33 | + }; |
32 | 34 |
|
33 |
| - zpool.${config.host.name} = { |
34 |
| - type = "zpool"; |
| 35 | + disko.devices.zpool.${config.host.name} = { |
| 36 | + type = "zpool"; |
35 | 37 |
|
36 |
| - options = { |
37 |
| - ashift = "12"; |
38 |
| - compatibility = "openzfs-2.2-linux"; |
39 |
| - }; |
| 38 | + options = { |
| 39 | + ashift = "12"; |
| 40 | + compatibility = "openzfs-2.2-linux"; |
| 41 | + }; |
40 | 42 |
|
41 |
| - rootFsOptions = { |
42 |
| - "com.sun:auto-snapshot" = "true"; |
43 |
| - acltype = "posix"; |
44 |
| - compression = "zstd"; |
45 |
| - dnodesize = "auto"; |
46 |
| - encryption = "aes-256-gcm"; |
47 |
| - keyformat = "passphrase"; |
48 |
| - keylocation = "prompt"; |
49 |
| - mountpoint = "none"; |
50 |
| - normalization = "formD"; |
51 |
| - xattr = "sa"; |
52 |
| - }; |
| 43 | + rootFsOptions = { |
| 44 | + "com.sun:auto-snapshot" = "true"; |
| 45 | + acltype = "posix"; |
| 46 | + compression = "zstd"; |
| 47 | + dnodesize = "auto"; |
| 48 | + encryption = "aes-256-gcm"; |
| 49 | + keyformat = "passphrase"; |
| 50 | + keylocation = "prompt"; |
| 51 | + mountpoint = "none"; |
| 52 | + normalization = "formD"; |
| 53 | + xattr = "sa"; |
| 54 | + }; |
53 | 55 |
|
54 |
| - datasets = { |
55 |
| - root = { |
56 |
| - mountpoint = "/"; |
57 |
| - type = "zfs_fs"; |
58 |
| - options.mountpoint = "legacy"; |
59 |
| - }; |
60 |
| - "root/home" = { |
61 |
| - mountpoint = "/home"; |
62 |
| - type = "zfs_fs"; |
63 |
| - options = { |
64 |
| - mountpoint = "legacy"; |
65 |
| - refreservation = "1G"; |
66 |
| - }; |
67 |
| - }; |
68 |
| - "root/var" = { |
69 |
| - mountpoint = "/var"; |
70 |
| - type = "zfs_fs"; |
71 |
| - options.mountpoint = "legacy"; |
| 56 | + datasets = { |
| 57 | + root = { |
| 58 | + mountpoint = "/"; |
| 59 | + type = "zfs_fs"; |
| 60 | + options.mountpoint = "legacy"; |
| 61 | + }; |
| 62 | + "root/home" = { |
| 63 | + mountpoint = "/home"; |
| 64 | + type = "zfs_fs"; |
| 65 | + options = { |
| 66 | + mountpoint = "legacy"; |
| 67 | + refreservation = "1G"; |
72 | 68 | };
|
73 |
| - "root/var/coredump" = { |
74 |
| - mountpoint = "/var/lib/systemd/coredump"; |
75 |
| - type = "zfs_fs"; |
76 |
| - options = { |
77 |
| - atime = "off"; |
78 |
| - compression = "zle"; |
79 |
| - mountpoint = "legacy"; |
80 |
| - recordsize = "1M"; |
81 |
| - }; |
| 69 | + }; |
| 70 | + "root/var" = { |
| 71 | + mountpoint = "/var"; |
| 72 | + type = "zfs_fs"; |
| 73 | + options.mountpoint = "legacy"; |
| 74 | + }; |
| 75 | + "root/var/coredump" = { |
| 76 | + mountpoint = "/var/lib/systemd/coredump"; |
| 77 | + type = "zfs_fs"; |
| 78 | + options = { |
| 79 | + atime = "off"; |
| 80 | + compression = "zle"; |
| 81 | + mountpoint = "legacy"; |
| 82 | + recordsize = "1M"; |
82 | 83 | };
|
83 |
| - "root/var/log" = { |
84 |
| - mountpoint = "/var/log"; |
85 |
| - type = "zfs_fs"; |
86 |
| - options = { |
87 |
| - atime = "off"; |
88 |
| - mountpoint = "legacy"; |
89 |
| - }; |
| 84 | + }; |
| 85 | + "root/var/log" = { |
| 86 | + mountpoint = "/var/log"; |
| 87 | + type = "zfs_fs"; |
| 88 | + options = { |
| 89 | + atime = "off"; |
| 90 | + mountpoint = "legacy"; |
90 | 91 | };
|
91 |
| - "root/nix" = { |
92 |
| - mountpoint = "/nix"; |
93 |
| - type = "zfs_fs"; |
94 |
| - options = { |
95 |
| - atime = "off"; |
96 |
| - mountpoint = "legacy"; |
97 |
| - }; |
| 92 | + }; |
| 93 | + "root/nix" = { |
| 94 | + mountpoint = "/nix"; |
| 95 | + type = "zfs_fs"; |
| 96 | + options = { |
| 97 | + atime = "off"; |
| 98 | + mountpoint = "legacy"; |
98 | 99 | };
|
99 |
| - "root/nix/store" = { |
100 |
| - mountpoint = "/nix/store"; |
101 |
| - type = "zfs_fs"; |
102 |
| - options = { |
103 |
| - "com.sun:auto-snapshot" = "false"; |
104 |
| - mountpoint = "legacy"; |
105 |
| - recordsize = "256K"; |
106 |
| - }; |
| 100 | + }; |
| 101 | + "root/nix/store" = { |
| 102 | + mountpoint = "/nix/store"; |
| 103 | + type = "zfs_fs"; |
| 104 | + options = { |
| 105 | + "com.sun:auto-snapshot" = "false"; |
| 106 | + mountpoint = "legacy"; |
| 107 | + recordsize = "256K"; |
107 | 108 | };
|
108 | 109 | };
|
109 | 110 | };
|
|
0 commit comments