forked from storopoli/flakes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisko.nix
55 lines (54 loc) · 1.36 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
{ config, disks ? [ "/dev/nvme0n1" ], ... }:
{
disko.devices = {
disk = {
nvme0n1 = {
device = builtins.elemAt disks 0;
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1GiB";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings = {
allowDiscards = true;
};
passwordFile = config.age.secrets.luks.path;
content = {
type = "filesystem";
format = "bcachefs";
extraArgs = [ "-f" ]; # Override existing partition
mountpoint = "/nix";
mountOptions = [ "compression=zstd" "noatime" ];
};
};
};
};
};
};
};
nodev = {
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"size=16G" # 32GB RAM (leaving 16GB for RAM)
"mode=755"
];
};
};
};
}