aboutsummaryrefslogtreecommitdiff
path: root/hosts/meowbook/disks.nix
blob: 50fb8944800bd35d90f5ad77fb4e05e9c5694652 (plain) (blame)
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
{ config, ... }:
{
  disko.devices.disk.main = {
    content = {
      partitions = {
        ESP = {
          content = {
            format = "vfat";
            mountOptions = [ "umask=0077" ];
            mountpoint = "/boot";
            type = "filesystem";
          };

          size = "512M";
          type = "EF00";
        };

        luks = {
          content = {
            content = {
              extraArgs = [ "-f" ];
              subvolumes = {
                "/home" = {
                  mountOptions = [ "noatime" ];
                  mountpoint = "/home";
                };

                "/nix" = {
                  mountOptions = [ "noatime" ];
                  mountpoint = "/nix";
                };

                "/root" = {
                  mountOptions = [ "noatime" ];
                  mountpoint = "/";
                };
              };

              type = "btrfs";
            };

            name = "root";
            type = "luks";
          };

          size = "100%";
        };
      };

      type = "gpt";
    };

    device = "/dev/nvme0n1";
    type = "disk";
  };
}