Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

Commit 64bdd20

Browse files
refactor(disko): clean up labels
1 parent 628a08c commit 64bdd20

File tree

3 files changed

+95
-92
lines changed

3 files changed

+95
-92
lines changed

nixos/server/hosts/crix/disko.nix

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,110 @@
11
{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";
1819
};
20+
};
1921

20-
root = {
21-
size = "100%";
22-
label = "root";
22+
root = {
23+
size = "100%";
24+
label = "root";
2325

24-
content = {
25-
type = "zfs";
26-
pool = config.host.name;
27-
};
26+
content = {
27+
type = "zfs";
28+
pool = config.host.name;
2829
};
2930
};
3031
};
3132
};
33+
};
3234

33-
zpool.${config.host.name} = {
34-
type = "zpool";
35+
disko.devices.zpool.${config.host.name} = {
36+
type = "zpool";
3537

36-
options = {
37-
ashift = "12";
38-
compatibility = "openzfs-2.2-linux";
39-
};
38+
options = {
39+
ashift = "12";
40+
compatibility = "openzfs-2.2-linux";
41+
};
4042

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+
};
5355

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";
7268
};
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";
8283
};
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";
9091
};
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";
9899
};
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";
107108
};
108109
};
109110
};

nixos/workstation/hosts/msix/disko.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
ESP = {
1111
size = "1G";
1212
type = "EF00";
13-
label = "BOOT";
13+
label = "boot";
14+
1415
content = {
1516
type = "filesystem";
1617
format = "vfat";

nixos/workstation/hosts/rescanix/disko.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
ESP = {
1111
size = "512M";
1212
type = "EF00";
13-
label = "BOOT";
13+
label = "boot";
14+
1415
content = {
1516
type = "filesystem";
1617
format = "vfat";

0 commit comments

Comments
 (0)