{ lib, ... }:
let
  inherit (lib.my.disko) mkBoot mkSwap mkRoot;
in
{
  disko.devices = {
    disk.builtin = {
      device = "/dev/nvme0n1";
      type = "disk";
      content = {
        type = "gpt";
        partitions = {
          ESP = mkBoot "1G";
          luks = {
            size = "100%";
            content = {
              type = "luks";
              name = "crypt";
              settings = {
                keyFile = "/tmp/secret.key";
                allowDiscards = true;
              };
              content = {
                type = "lvm_pv";
                vg = "pool";
              };
            };
          };
        };
      };
    };
    lvm_vg = {
      pool = {
        type = "lvm_vg";
        lvs = {
          swap = mkSwap "32G";
          root = mkRoot "100%" "ext4";
        };
      };
    };
  };
}
