-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_disko.nix
152 lines (145 loc) · 4.2 KB
/
_disko.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# disko.nix
# NOTE:
# this system was not originally installed using disko
# hence the existing filesystem is not the EXACT same
# as what is specified by this file (e.g. partition labels, exact sizes, etc.)
# therefore this file currently just serves as a reference point or used to
# install on a new system
{ ... }:
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
esp = {
name = "esp";
type = "EF00";
size = "512M";
content = {
type = "filesystem";
format = "vfat";
extraArgs = [ "-n ESP" ];
mountpoint = "/boot";
mountOptions = [ "fmask=0077" "dmask=0077" ];
};
};
cr_root = {
size = "100%";
content = {
name = "cr_root";
type = "luks";
extraFormatArgs = [ "--label CR_ROOT" ];
# passwordFile = "";
# settings.keyFile = "";
additionalKeyFiles = [ "/root/luks/grunfeld-cr_root-keyslot1.bin" ];
content = {
type = "lvm_pv";
vg = "vg_nixos";
};
};
};
};
};
};
nvme1n1 = {
device = "/dev/nvme1n1";
type = "disk";
content = {
type = "gpt";
partitions = {
cr_data0 = {
size = "100%";
content = {
name = "cr_data0";
type = "luks";
extraArgs = [ "--label CR_DATA0" ];
# passwordFile = "";
# settings.keyFile = "";
additionalKeyFiles = [ "/root/luks/grunfeld-cr_data0-keyslot1.bin" ];
content = {
type = "lvm_pv";
vg = "vg_data";
};
};
};
};
};
};
};
lvm_vg = {
vg_nixos = {
type = "lvm_vg";
lvs = {
lv_swap = {
size = "31743MiB";
content = {
type = "swap";
extraArgs = [ "-L SWAP" ];
};
};
lv_root = {
size = "100%free";
content = {
type = "btrfs";
extraArgs = [ "-L ROOT" ];
subvolumes = {
"@" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@root" = {
mountpoint = "/root";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@log" = {
mountpoint = "/var/log";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@cache" = {
mountpoint = "/var/cache";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@mpham" = {
mountpoint = "/home/mpham";
mountOptions = [ "compress=zstd" "noatime" ];
};
"/home/mpham/.snapshots" = {};
"/home/mpham/downloads" = {};
"/home/mpham/git" = {};
"/home/mpham/tmp" = {};
"/home/mpham/.local/share/Steam" = {};
};
};
};
};
};
vg_data = {
type = "lvm_vg";
lvs = {
lv_data = {
size = "100%free";
content = {
type = "filesystem";
format = "xfs";
extraArgs = [ "-L DATA" ];
mountpoint = "/mnt/data";
mountOptions = [ "nofail" "relatime" ];
};
};
};
};
};
};
}