{
  disko.devices.disk =
    let
      bootPartition = {
        size = "1M";
        type = "EF02";
      };

      swapPartition = {
        # 8G is apparently recommended for this much RAM, but we set up
        # 4G on both disks for mirroring purposes.
        #
        # That'll still be 8G during normal operation, and it's probably
        # not too bad to have slightly less swap if a disk dies.
        size = "4G";
        content = {
          type = "swap";
          randomEncryption = true;
        };
      };

      mountOptions = [
        "compress=zstd"
        "noatime"
      ];
    in
    {
      sda = {
        type = "disk";
        device = "/dev/sda";
        content = {
          type = "gpt";
          partitions = {
            boot = bootPartition;
            swap = swapPartition;

            disk1 = {
              size = "100%";
              # Empty partition to combine in RAID0 with the other disk
            };
          };
        };
      };

      sdb = {
        type = "disk";
        device = "/dev/sdb";
        content = {
          type = "gpt";
          partitions = {
            boot = bootPartition;
            swap = swapPartition;

            disk2 = {
              size = "100%";
              content = {
                type = "btrfs";
                # Hack to get multi-device btrfs going
                # See https://github.com/nix-community/disko/issues/99
                extraArgs = [
                  "-d"
                  "raid1"
                  "-m"
                  "raid1"
                  "--runtime-features"
                  "quota"
                  "/dev/sda3"
                ];
                subvolumes = {
                  "/volume" = { };
                  "/volume/root" = {
                    inherit mountOptions;
                    mountpoint = "/";
                  };
                  "/volume/home" = {
                    inherit mountOptions;
                    mountpoint = "/home";
                  };
                  "/volume/var" = {
                    inherit mountOptions;
                    mountpoint = "/var";
                  };
                  "/volume/var/lib/private/matrix-conduit" = {
                    mountOptions = [
                      # Explicitly don't compress here, since
                      # conduwuit's database does compression by
                      # itself, and relies on being able to read the
                      # raw file data from disk (which is impossible
                      # if btrfs compresses it)
                      "noatime"
                    ];
                    mountpoint = "/var/lib/private/matrix-conduit";
                  };
                  "/volume/nix-store" = {
                    inherit mountOptions;
                    mountpoint = "/nix";
                  };
                  "/snapshots" = { };
                };
              };
            };
          };
        };
      };
    };
}
