Skip to content

Commit e2d7084

Browse files
committed
marie-nas: use ext4 on luks for rootfs (temporarily)
1 parent a2fa32c commit e2d7084

File tree

2 files changed

+61
-52
lines changed

2 files changed

+61
-52
lines changed

hosts/marie-nas/disko.nix

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131
name = "root";
3232
settings = {
3333
allowDiscards = true;
34-
keyFile = "/encryption-keys/root.key";
34+
keyFile = "/mnt/encryption-keys/root.key";
3535
};
3636
content = {
37-
type = "zfs";
38-
pool = "zroot";
37+
type = "filesystem";
38+
format = "ext4";
39+
mountpoint = "/";
3940
};
4041
};
4142
};
@@ -46,32 +47,32 @@
4647
type = "disk";
4748
device = "/dev/disk/by-id/ata-WDC_WD120EFBX-68B0EN0_D7JPDSJN";
4849
content = {
49-
type = "luks";
50-
name = "wd-red-plus-a";
51-
settings = {
52-
allowDiscards = true;
53-
keyFile = "/encryption-keys/wd-red-plus-a.key";
54-
};
55-
content = {
50+
# type = "luks";
51+
# name = "wd-red-plus-a";
52+
# settings = {
53+
# allowDiscards = true;
54+
# keyFile = "/mnt/encryption-keys/wd-red-plus-a.key";
55+
# };
56+
# content = {
5657
type = "zfs";
5758
pool = "tank";
58-
};
59+
# };
5960
};
6061
};
6162
wd-red-plus-b = {
6263
type = "disk";
6364
device = "/dev/disk/by-id/ata-WDC_WD120EFBX-68B0EN0_D7JLAHXN";
6465
content = {
65-
type = "luks";
66-
name = "wd-red-plus-b";
67-
settings = {
68-
allowDiscards = true;
69-
keyFile = "/encryption-keys/wd-red-plus-b.key";
70-
};
71-
content = {
66+
# type = "luks";
67+
# name = "wd-red-plus-b";
68+
# settings = {
69+
# allowDiscards = true;
70+
# keyFile = "/mnt/encryption-keys/wd-red-plus-b.key";
71+
# };
72+
# content = {
7273
type = "zfs";
7374
pool = "tank";
74-
};
75+
# };
7576
};
7677
};
7778
};
@@ -87,27 +88,27 @@
8788
};
8889
in
8990
{
90-
zroot = {
91-
type = "zpool";
92-
rootFsOptions = options;
93-
options.ashift = "12";
94-
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/local/root@blank$' || zfs snapshot zroot/local/root@blank";
91+
# zroot = {
92+
# type = "zpool";
93+
# rootFsOptions = options;
94+
# options.ashift = "12";
95+
# postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/local/root@blank$' || zfs snapshot zroot/local/root@blank";
9596

96-
datasets = {
97-
"local/nix" = {
98-
type = "zfs_fs";
99-
mountpoint = "/nix";
100-
};
101-
"local/root" = {
102-
type = "zfs_fs";
103-
mountpoint = "/";
104-
};
105-
"data/state" = {
106-
type = "zfs_fs";
107-
mountpoint = "/state";
108-
};
109-
};
110-
};
97+
# datasets = {
98+
# "local/nix" = {
99+
# type = "zfs_fs";
100+
# mountpoint = "/nix";
101+
# };
102+
# "local/root" = {
103+
# type = "zfs_fs";
104+
# mountpoint = "/";
105+
# };
106+
# "data/state" = {
107+
# type = "zfs_fs";
108+
# mountpoint = "/state";
109+
# };
110+
# };
111+
# };
111112
tank = {
112113
type = "zpool";
113114
mode = "mirror";
@@ -118,17 +119,20 @@
118119
"data/shares" = {
119120
type = "zfs_fs";
120121
mountpoint = "/srv/shares";
122+
options.mountpoint = "legacy";
121123
};
122124
"data/shares/media" = {
123125
type = "zfs_fs";
124126
mountpoint = "/srv/shares/media";
125127
options = {
126128
recordsize = "1M";
129+
mountpoint = "legacy";
127130
};
128131
};
129132
"data/shares/marie" = {
130133
type = "zfs_fs";
131134
mountpoint = "/srv/shares/marie";
135+
options.mountpoint = "legacy";
132136
};
133137
};
134138
};

hosts/marie-nas/filesystems.nix

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,26 @@
1111
};
1212
};
1313
fileSystems = {
14+
# "/" = {
15+
# device = "zroot/local/root";
16+
# fsType = "zfs";
17+
# neededForBoot = true;
18+
# };
1419
"/" = {
15-
device = "zroot/local/root";
16-
fsType = "zfs";
17-
neededForBoot = true;
20+
device = "/dev/mapper/root";
21+
fsType = "ext4";
22+
options = [ "defaults" ];
1823
};
1924
"/boot" = {
2025
device = "/dev/disk/by-partlabel/disk-boot-esp";
2126
fsType = "vfat";
2227
options = [ "umask=0077" ];
2328
};
24-
"/nix" = {
25-
device = "zroot/local/nix";
26-
fsType = "zfs";
27-
neededForBoot = true;
28-
};
29+
# "/nix" = {
30+
# device = "zroot/local/nix";
31+
# fsType = "zfs";
32+
# neededForBoot = true;
33+
# };
2934
"/srv/shares" = {
3035
device = "tank/data/shares";
3136
fsType = "zfs";
@@ -41,11 +46,11 @@
4146
fsType = "zfs";
4247
options = [ "nofail" ];
4348
};
44-
"/state" = {
45-
device = "zroot/data/state";
46-
fsType = "zfs";
47-
neededForBoot = true;
48-
};
49+
# "/state" = {
50+
# device = "zroot/data/state";
51+
# fsType = "zfs";
52+
# neededForBoot = true;
53+
# };
4954
};
5055
swapDevices = [
5156
{

0 commit comments

Comments
 (0)