main
nix 68 lines 1.34 KB
Raw
1 {
2 disk = {
3 main = {
4 type = "disk";
5 device = "/dev/sda";
6 content = {
7 type = "gpt";
8 partitions = {
9 grub = {
10 size = "1M";
11 type = "EF02";
12 };
13 boot = {
14 size = "1G";
15 type = "EF00";
16 content = {
17 type = "filesystem";
18 format = "vfat";
19 mountpoint = "/boot";
20 mountOptions = [ "umask=0077" ];
21 };
22 };
23 root = {
24 size = "100%";
25 content = {
26 type = "zfs";
27 pool = "zroot";
28 };
29 };
30 };
31 };
32 };
33 };
34
35 zpool = {
36 zroot = {
37 type = "zpool";
38 options = {
39 # smartctl --all /dev/sda
40 # Logical block size: 512 bytes
41 ashift = "9";
42 };
43 rootFsOptions = {
44 acltype = "posixacl";
45 compression = "zstd";
46 mountpoint = "none";
47 xattr = "sa";
48 };
49 datasets = {
50 "root" = {
51 type = "zfs_fs";
52 mountpoint = "/";
53 };
54 "nix" = {
55 type = "zfs_fs";
56 mountpoint = "/nix";
57 };
58 "reserved" = {
59 type = "zfs_fs";
60 options = {
61 canmount = "off";
62 refreservation = "1G";
63 };
64 };
65 };
66 };
67 };
68 }