This repository has no description
3.3 kB
145 lines
1{ lib, ... }:
2{
3 disko.imageBuilder.extraRootModules = [
4 "zfs"
5 ];
6 disko.tests.extraConfig = {
7 services.mingetty.autologinUser = "root";
8 };
9 disko.devices = {
10 disk =
11 (lib.genAttrs
12 [
13 "/dev/nvme0n1"
14 "/dev/nvme1n1"
15 ]
16 (disk: {
17 type = "disk";
18 device = disk;
19 imageSize = "3G";
20 content = {
21 type = "gpt";
22 partitions = {
23 boot = {
24 size = "1M";
25 type = "EF02";
26 };
27 ESP = {
28 size = "1G";
29 content = {
30 type = "mdraid";
31 name = "boot";
32 };
33 };
34 zfs = {
35 size = "100%";
36 content = {
37 type = "zfs";
38 pool = "zroot";
39 };
40 };
41 };
42 };
43 })
44 )
45 // {
46 hdd1 = {
47 type = "disk";
48 device = "/dev/sda";
49 content = {
50 type = "zfs";
51 pool = "tank";
52 };
53 };
54 };
55 mdadm = {
56 boot = {
57 type = "mdadm";
58 level = 1;
59 metadata = "1.0";
60 content = {
61 type = "filesystem";
62 format = "vfat";
63 mountpoint = "/boot";
64 };
65 };
66 };
67 zpool = {
68 zroot = {
69 type = "zpool";
70 mode = "mirror";
71 mountpoint = "/";
72 rootFsOptions = {
73 };
74 datasets = {
75 reserved = {
76 type = "zfs_fs";
77 options.refreservation = "1G";
78 };
79 pairprogramming = {
80 type = "zfs_fs";
81 mountpoint = "/home/pairprogramming";
82 options = {
83 canmount = "noauto";
84 };
85
86 };
87 };
88 };
89 tank = {
90 type = "zpool";
91 datasets = {
92 reserved = {
93 type = "zfs_fs";
94 options.refreservation = "1G";
95 };
96 containers = {
97 type = "zfs_fs";
98 mountpoint = "/var/lib/containers";
99 options = {
100 canmount = "noauto";
101 };
102 };
103 home = {
104 type = "zfs_fs";
105 mountpoint = "/home";
106 options = {
107 canmount = "noauto";
108 };
109 };
110 srv = {
111 type = "zfs_fs";
112 mountpoint = "/srv";
113 options = {
114 canmount = "noauto";
115 };
116 };
117 libvirt = {
118 type = "zfs_fs";
119 mountpoint = "/var/lib/libvirt";
120 options = {
121 canmount = "noauto";
122 };
123 };
124 # encrypted = {
125 # type = "zfs_fs";
126 # options = {
127 # canmount = "noauto";
128 # mountpoint = "none";
129 # encryption = "aes-256-gcm";
130 # keyformat = "passphrase";
131 # keylocation = "prompt";
132 # };
133 # };
134 # "encrypted/download" = {
135 # type = "zfs_fs";
136 # mountpoint = "/var/download";
137 # options = {
138 # canmount = "noauto";
139 # };
140 # };
141 };
142 };
143 };
144 };
145}