aboutsummaryrefslogtreecommitdiff
path: root/infra/hosts/indra/disk.nix
blob: 5aab05b97219692534b35af335523dabb5182e27 (plain)
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
{
  flake.modules.nixos.indra =
    { config, ... }:
    {
      infra.zfs.pool = "zroot";

      disko.devices.disk.main = {
        type = "disk";
        imageSize = "100G";
        device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";
        content = {
          type = "gpt";
          partitions = {
            bios = {
              size = "1M";
              type = "EF02";
            };

            boot = {
              size = "512M";
              content = {
                type = "filesystem";
                format = "ext4";
                mountpoint = "/boot";
                mountOptions = [ "noatime" ];
              };
            };

            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = config.infra.zfs.pool;
              };
            };
          };
        };
      };

    };
}