///|
fn linux_model(
  name~ : String,
  about~ : String,
  host~ : String,
  os~ : String,
  device~ : String,
  kernel~ : String,
  resolution~ : Resolution?,
  de~ : String,
  wm~ : String,
  wm_theme~ : String,
  terminal~ : String,
  term_font~ : String,
  cpu~ : Cpu,
  gpu~ : Gpu,
  memory~ : Memory,
  logo~ : String,
  shell? : String = "zsh 5.9",
  uptime? : Uptime = { hours: 5, mins: 47 },
) -> DeviceModel {
  {
    name,
    about,
    host,
    os,
    device,
    kernel,
    uptime,
    shell,
    resolution,
    de,
    wm,
    wm_theme,
    terminal,
    term_font,
    cpu,
    gpu,
    memory,
    logo,
  }
}

///|
/// ThinkPad X1 Carbon Gen 11, Intel Core i7-1365U, 32 GB RAM, Arch Linux.
fn thinkpad_x1_model() -> DeviceModel {
  linux_model(
    name="thinkpad-x1",
    about="Linux ThinkPad X1 Carbon Gen 11 (Arch)",
    host="x1",
    os="Arch Linux x86_64",
    device="ThinkPad X1 Carbon Gen 11",
    kernel="Linux 6.9.3-arch1-1",
    resolution=Some({ width: 2880, height: 1800 }),
    de="GNOME (Wayland)",
    wm="Mutter",
    wm_theme="Adwaita-dark",
    terminal="GNOME Terminal",
    term_font="Monospace 11",
    cpu={ name: "Intel Core i7-1365U", cores: 10, clock: 5.20 },
    gpu=gpu_iris_xe,
    memory={ used: 12.30, total: 32.00 },
    logo="arch",
  )
}

///|
/// Custom desktop: AMD Ryzen 9 7950X, NVIDIA RTX 4090, 64 GB RAM, NixOS.
fn ryzen_desktop_model() -> DeviceModel {
  linux_model(
    name="ryzen-desktop",
    about="Linux desktop Ryzen 9 7950X / RTX 4090 64 GB (NixOS)",
    host="helios",
    os="NixOS 24.11 (Vicuna) x86_64",
    device="MSI MAG B650 TOMAHAWK WIFI",
    kernel="Linux 6.9.9-nixos",
    resolution=Some({ width: 2560, height: 1440 }),
    de="KDE Plasma",
    wm="KWin",
    wm_theme="Breeze Dark",
    terminal="kitty",
    term_font="Hack Nerd Font 11",
    cpu={ name: "AMD Ryzen 9 7950X", cores: 32, clock: 5.70 },
    gpu=gpu_rtx_4090,
    memory={ used: 28.80, total: 64.00 },
    logo="nixos",
  )
}

///|
/// ThinkPad T14s Gen 4, AMD Ryzen 7 PRO 7840U, 16 GB RAM, Ubuntu 24.04.
fn thinkpad_t14s_model() -> DeviceModel {
  linux_model(
    name="thinkpad-t14s",
    about="Linux ThinkPad T14s Gen 4 (Ubuntu)",
    host="t14s",
    os="Ubuntu 24.04 LTS (Noble Numbat) x86_64",
    device="ThinkPad T14s Gen 4",
    kernel="Linux 6.8.0-45-generic",
    resolution=Some({ width: 2240, height: 1400 }),
    de="GNOME (Wayland)",
    wm="Mutter",
    wm_theme="Yaru-dark",
    terminal="GNOME Terminal",
    term_font="Monospace 11",
    cpu={ name: "AMD Ryzen 7 PRO 7840U", cores: 8, clock: 5.10 },
    gpu=gpu_radeon_780m,
    memory={ used: 7.80, total: 16.00 },
    logo="ubuntu",
  )
}

///|
/// Custom desktop: AMD Ryzen 7 7800X3D, Radeon RX 7800 XT, 32 GB RAM, Fedora 40.
fn fedora_desktop_model() -> DeviceModel {
  linux_model(
    name="fedora-desktop",
    about="Linux desktop Ryzen 7 7800X3D / RX 7800 XT 32 GB (Fedora)",
    host="fedora",
    os="Fedora Linux 40 (Workstation Edition) x86_64",
    device="Custom AMD AM5",
    kernel="Linux 6.9.12-200.fc40.x86_64",
    resolution=Some({ width: 2560, height: 1440 }),
    de="GNOME (Wayland)",
    wm="Mutter",
    wm_theme="Adwaita-dark",
    terminal="GNOME Console",
    term_font="Monospace 11",
    cpu={ name: "AMD Ryzen 7 7800X3D", cores: 8, clock: 5.00 },
    gpu=gpu_rx_7800_xt,
    memory={ used: 18.40, total: 32.00 },
    logo="fedora",
  )
}

///|
/// Custom desktop: Intel Core i7-13700K, RTX 4070, 32 GB RAM, Debian 12.
fn debian_desktop_model() -> DeviceModel {
  linux_model(
    name="debian-desktop",
    about="Linux desktop Core i7-13700K / RTX 4070 32 GB (Debian)",
    host="debian",
    os="Debian GNU/Linux 12 (bookworm) x86_64",
    device="Custom Intel LGA1700",
    kernel="Linux 6.1.0-22-amd64",
    resolution=Some({ width: 3840, height: 2160 }),
    de="KDE Plasma",
    wm="KWin",
    wm_theme="Breeze Dark",
    terminal="Konsole",
    term_font="Hack 11",
    cpu={ name: "Intel Core i7-13700K", cores: 16, clock: 5.40 },
    gpu=gpu_rtx_4070,
    memory={ used: 15.20, total: 32.00 },
    logo="debian",
  )
}

///|
/// Omarchy 4 "Quattro" desktop, AMD Ryzen 9 9950X3D, RTX 5080, 64 GB RAM.
fn omarchy_model() -> DeviceModel {
  linux_model(
    name="omarchy-quattro",
    about="Linux Omarchy 4.0 (Quattro) desktop",
    host="quattro",
    os="Omarchy 4.0 (Quattro) x86_64",
    device="Custom AMD AM5",
    kernel="Linux 6.12.4-arch1-1",
    resolution=Some({ width: 2560, height: 1440 }),
    de="",
    wm="Hyprland",
    wm_theme="Unknown",
    terminal="Foot",
    term_font="JetBrainsMono Nerd Font 9",
    cpu={ name: "AMD Ryzen 9 9950X3D", cores: 16, clock: 5.70 },
    gpu=gpu_rtx_5080,
    memory={ used: 22.30, total: 64.00 },
    logo="omarchy",
    shell="bash 5.2",
  )
}

///|
/// Acer Chromebook Spin 514, AMD Ryzen 3 7320C, 8 GB RAM, ChromeOS.
fn chromebook_model() -> DeviceModel {
  linux_model(
    name="chromebook-spin-514",
    about="ChromeOS Acer Chromebook Spin 514",
    host="spin514",
    os="Chrome OS 140.0.7049.0 (stable) x86_64",
    device="Acer Chromebook Spin 514 (CB514-2H)",
    kernel="Linux 6.1.72-g2b5c2e1",
    resolution=Some({ width: 2256, height: 1504 }),
    de="",
    wm="Ash (Aura)",
    wm_theme="",
    terminal="crosh",
    term_font="Noto Sans Mono 12",
    cpu={ name: "AMD Ryzen 3 7320C", cores: 4, clock: 4.10 },
    gpu=gpu_radeon_610m,
    memory={ used: 3.20, total: 8.00 },
    logo="chrom",
    shell="bash 5.2",
  )
}

///|
/// Alpine 3.20 droplet, AMD EPYC 7443P, 2 GiB RAM, headless server.
fn alpine_server_model() -> DeviceModel {
  linux_model(
    name="alpine-server",
    about="Linux Alpine 3.20 server (headless)",
    host="edge",
    os="Alpine Linux 3.20.3 x86_64",
    device="DigitalOcean Droplet",
    kernel="Linux 6.6.59-0-virt",
    resolution=None,
    de="",
    wm="",
    wm_theme="",
    terminal="",
    term_font="",
    cpu={ name: "AMD EPYC 7443P", cores: 2, clock: 3.85 },
    gpu=no_gpu,
    memory={ used: 0.42, total: 2.00 },
    logo="alpine",
    shell="ash 5.0",
  )
}

///|
/// Gentoo 2.15 home server, AMD Ryzen 7 7700, 32 GB RAM, headless.
fn gentoo_server_model() -> DeviceModel {
  linux_model(
    name="gentoo-server",
    about="Linux Gentoo server (headless)",
    host="phoenix",
    os="Gentoo Linux 2.15 x86_64",
    device="ASRock Rack B650D4U",
    kernel="Linux 6.9.9-gentoo",
    resolution=None,
    de="",
    wm="",
    wm_theme="",
    terminal="",
    term_font="",
    cpu={ name: "AMD Ryzen 7 7700", cores: 8, clock: 5.30 },
    gpu=no_gpu,
    memory={ used: 6.20, total: 32.00 },
    logo="gentoo",
    shell="bash 5.2",
    uptime={ hours: 14, mins: 23 },
  )
}