# camel.toml — distribution manifest (single source of truth)
# =============================================================================
# Codename "camel" is the STABLE internal handle. The project/OS name is still
# provisional — it may stay "taninux", shrink to "tanin", or the shipped OS may
# get a different marketing name later. Everything that must not break when the
# name changes keys off `codename`, not `name`.
#
# This file is the canonical spec. The PKGBUILDs under ../packaging, the archiso
# profile, and docs/distribution.md should be derived from / reconciled against
# it. Last reconciled: 2026-06-17 (compositor switched Hyprland -> niri).
# =============================================================================

[distribution]
codename     = "camel"
name         = "taninux"            # PROVISIONAL (taninux | tanin | TBD)
display_name = "TANINUX"            # PROVISIONAL
tagline      = "A curated Arch desktop — niri + eww, managed by TANINUX."
base         = "arch"               # not a fork; Arch + own [tanin] repo
arch         = ["x86_64"]
channel      = "rolling"
license      = "GPL-3.0-or-later"
homepage     = "https://taninux.kgva.ch"
maintainer   = "Karim <karim@gabrielevarano.ch>"

# Visual identity — the "Fuji" palette. Mirrored into eww (accent.sh) and the
# greeter/GTK theme. Single source for accent so DM, bar and apps agree.
[identity]
theme      = "dark, monochrome, libadwaita, soft short shadows, rounded"
accent     = "#a39ec4"              # Fuji violet
bg         = "#0f0f0f"
fg         = "#f0f0f0"
ui_font    = "Inter"                # Medium
icon_font  = "Iosevka Nerd Font"    # Material Design Icons (nf-md-*)
icon_theme = "Papirus"              # dock app icons

# -----------------------------------------------------------------------------
# Package sources. Standard software comes from the official Arch repos; only
# our own packages (and AUR deps we are forced to rebuild) live in [tanin].
# -----------------------------------------------------------------------------
[sources.arch]
repos = ["core", "extra", "multilib"]

[sources.tanin]
repo_name = "tanin"
status    = "LIVE — hosted on the Gitea Arch registry, 9 packages, public, pacman-usable"
server    = "https://git.openbureau.ch/api/packages/karim/arch/tanin/$arch"
code_host = "https://git.openbureau.ch/karim/taninux"   # PKGBUILD source clones
siglevel  = "Optional TrustAll"     # works once Gitea's DB-signing key is imported
db_key    = "Gitea signs the repo DB with 63F0415879323F6BFE0FBFB2B6FDF356206AF4F6; import via .../arch/repository.key + pacman-key --lsign-key. ISO/Calamares must import it too."
publish   = "packaging/publish-tanin-repo.sh (needs a write:package token); Gitea builds the DB server-side"
vanity    = "taninux.kgva.ch can reverse-proxy / front this later"

[sources.aur]
# Policy: AUR is OPT-IN. Nothing in the desktop may HARD-depend on the AUR
# (binary repos must not need it). paru is an optdepend only. Any AUR package
# the desktop genuinely needs is rebuilt into [tanin] (see packages.rebuilt_aur).
policy   = "opt-in"
helper   = "paru"                   # optdepend, never a hard depend

# -----------------------------------------------------------------------------
# The desktop stack — what the OS actually boots into.
# -----------------------------------------------------------------------------
[stack]
display_manager = "greetd"          # greeter = tanin-greet (own GTK4 greeter)
greeter         = "tanin-greet"     # custom; mirrors the eww topbar
compositor      = "niri"            # Wayland, niri-only (Hyprland/Sway removed)
shell_bar       = "tanin-eww"       # eww bar + dock + panels + spotlight
launcher        = "Spotlight (eww)"
notifications   = "tiramisu (headless) + eww UI"   # replaces mako
terminal        = "foot"
wallpaper       = "waypaper"
session_target  = "tanin-session.target"           # pulls graphical-session.target for portals
apps            = ["tsettings", "thub", "taninux (TUI)"]
gtk_theme       = "tanin-libadwaita"   # Fuji recolour, light + dark
portals         = ["xdg-desktop-portal-gtk", "xdg-desktop-portal-gnome"]
# gtk portal -> org.freedesktop.portal.Settings (dark mode for libadwaita apps);
# gnome portal -> screencast (niri's recommended screencast backend).

# =============================================================================
# OWN PACKAGES — built from our repo, served from [tanin].
# =============================================================================
[[packages.own]]
name     = "taninux"
desc     = "GTK System Settings (tsettings) + Software Hub (thub) + TUI"
provides = ["tsettings", "thub", "taninux"]
pkgbuild = "packaging/taninux/PKGBUILD"           # exists
status   = "ready"

[[packages.own]]
name     = "tanin-eww"
desc     = "eww bar/dock/panels/spotlight + niri config -> /usr/share/tanin/skel/.config"
upstream = "~/projects/eww (local build; EWW_SRC override). Publish: own eww git repo."
pkgbuild = "packaging/tanin-eww/PKGBUILD"          # exists
status   = "ready (built from local eww; niri config vendored + path-fixed)"
note     = "ships ~/.config/{eww,niri}; rewrites $HOME/projects/eww -> $HOME/.config/eww; niri spawn-at-startup uses sh -c so $HOME expands"

[[packages.own]]
name     = "tanin-greet"
desc     = "custom GTK4 greeter for greetd — topbar + wallpaper + corner session"
pkgbuild = "packaging/tanin-greet/PKGBUILD"        # exists
status   = "ready (previewed)"
note     = "replaces ReGreet — its fixed layout couldn't do topbar/corner-session"

[[packages.own]]
name     = "tanin-libadwaita"
desc     = "Fuji recolour for GTK4/libadwaita + GTK3 — light + dark, pill controls"
pkgbuild = "packaging/tanin-libadwaita/PKGBUILD"   # exists
status   = "ready (live-verified GTK4; GTK3 partial) + ships tanin-libadwaita.service (user, watch)"
note     = "STATIC defaults + CLI (tanin-libadwaita {dark|light|auto|watch}) for greeter/first-boot. LIVE theming is driven by the taninux app: gui/style.py write_global_theme() regenerates ~/.config/gtk-{4.0,3.0}/gtk(.css)|libadwaita.css from the Appearance settings (dynamic accent + light/dark, surfaces #0f0f0f/#f0f0f0, pills). GTK4/libadwaita = full exact Fuji; GTK3/adw-gtk3 = light/dark + pills only (GTK3 @define-color is parse-time, so adw-gtk3's accent/surfaces can't be overridden — exact-Fuji GTK3 would need a standalone GTK3 theme)."

[[packages.own]]
name     = "tanin-setup"
desc     = "first-run: seed ~/.config (eww+niri) + session target + apply theme + enable follower"
pkgbuild = "packaging/tanin-setup/PKGBUILD"        # exists
status   = "ready (wires theme follower)"
note     = "seed_configs + install tanin-session.target + tanin-libadwaita auto + systemctl --user enable --now tanin-libadwaita.service. niri config (tanin-eww) autostarts dbus-update-activation-environment + tanin-session.target."

[[packages.own]]
name     = "tanin-desktop"
desc     = "metapackage — depends-pulls the whole environment (own + Arch)"
pkgbuild = "packaging/tanin-desktop/PKGBUILD"      # exists
type     = "meta"
status   = "ready (niri stack; all own deps now exist)"

# =============================================================================
# REBUILT AUR DEPS — hard requirements of the desktop that are NOT in the
# official repos. Rebuilt into [tanin] so tanin-desktop can hard-depend on them
# without pulling the AUR. Verify each repo membership before publishing
# (some of these may already be in `extra`; if so, drop them from here).
# =============================================================================
# All three are LIVE in [tanin] (built + uploaded). eww-git provides 'eww'.
[[packages.rebuilt_aur]]
name   = "eww-git"
reason = "desktop bar/dock/panels — not in official repos (provides eww)"
status = "in [tanin]"

[[packages.rebuilt_aur]]
name   = "tiramisu-git"
reason = "headless notification daemon feeding the eww UI (no 'tiramisu' provides; deps use tiramisu-git)"
status = "in [tanin]"

[[packages.rebuilt_aur]]
name   = "waypaper"
reason = "wallpaper setter (niri autostart: waypaper --restore)"
status = "in [tanin]"

[[packages.rebuilt_aur]]
name   = "calamares"
reason = "GUI installer for the ISO — AUR-only, not in official repos"
status = "TODO — heavy Qt build; rebuild into [tanin] (finish-tanin-repo.sh / BUILD.md one-liner)"

[[packages.rebuilt_aur]]
name   = "paru (or paru-bin)"
reason = "AUR helper — wanted preinstalled on the ISO; must be in [tanin] first"
status = "TODO — not yet rebuilt; ISO packages.x86_64 keeps it commented until then"

# cliphist + cage are in `extra` (verified) — NOT rebuilt, pulled from official repos.

# =============================================================================
# ARCH PACKAGE SET — hard depends of tanin-desktop, pulled from official repos.
# Grouped by role. This is the buildable seed for archiso packages.x86_64.
# =============================================================================
[packages.arch]
compositor   = ["niri"]
greeter      = ["greetd", "cage"]                  # cage hosts our own tanin-greet (GTK4); no regreet
portals      = ["xdg-desktop-portal", "xdg-desktop-portal-gtk", "xdg-desktop-portal-gnome"]
toolkit      = ["gtk4", "libadwaita", "gtk3", "python", "python-gobject"]
terminal     = ["foot"]
cli          = ["jq", "wl-clipboard", "xdg-utils", "libqalculate"]   # libqalculate -> qalc
connectivity = ["networkmanager", "bluez", "bluez-utils"]
audio        = ["pipewire", "pipewire-pulse", "wireplumber"]         # wpctl, pactl
hardware     = ["brightnessctl"]
media        = ["playerctl"]
screenshot   = ["grim", "slurp"]
packages     = ["flatpak", "pacman-contrib"]       # checkupdates, paccache
security     = ["polkit"]
fonts        = ["inter-font", "ttf-iosevka-nerd"]  # verify nerd-font pkg name
icons        = ["papirus-icon-theme", "adwaita-icon-theme"]

[packages.optional]
# optdepends — installed on demand, never required to boot.
"paru"            = "AUR support in the Software Hub (opt-in)"
"wlsunset"        = "night light"
"cups"            = "printer management"
"timeshift"       = "system snapshots/backups"
"waybar"          = "fallback bar if eww is missing (launch.sh falls back to it)"

# =============================================================================
# DELIVERY / BUILD — how camel becomes an installable ISO.
# =============================================================================
[delivery]
model            = "own binary repo [tanin] + official Arch repos (EndeavourOS/CachyOS style)"
iso_tool         = "archiso"
iso_profile      = "iso/ — releng-base + overrides; bootstrap-profile.sh assembles + builds. systemd-boot, btrfs+snapper, plymouth, linux-zen, Calamares clone-install. Scaffold; needs build-test."
installer        = "calamares"
calamares_target = "tanin-desktop"        # the netinstall/packages module installs just this
dotfiles         = "tanin-setup seeds ~/.config from /usr/share/tanin/skel (never writes /home at pkg time)"

[delivery.hosts]
code    = "git.openbureau.ch/karim/taninux"     # source for makepkg
project = "taninux.kgva.ch"                      # homepage + [tanin] pacman Server

# pacman.conf snippet shipped to users:
#   [tanin]
#   SigLevel = Optional TrustAll
#   Server   = https://taninux.kgva.ch/$arch

# =============================================================================
# OPEN QUESTIONS — decide before tagging a release.
# =============================================================================
[open_questions]
name              = "Final project/OS name: keep TANINUX, or split app=tanin / OS=<marketing name>?"
repo_hosting      = "Gitea/Forgejo Arch registry vs static dir behind taninux.kgva.ch"
signing           = "Move [tanin] SigLevel to Required + distribute the packager key"
aur_repo_check    = "DONE — cliphist+cage in extra; only eww/tiramisu/waypaper need AUR rebuild into [tanin]"
repo_build        = "packaging/build-tanin-repo.sh builds the 5 own pkgs + DB at ~/projects/tanin-repo. Still need: taninux (sudo pacman -S python-build python-installer python-hatchling), the 3 AUR rebuilds (paru/makepkg + sudo), optional GPG signing key, then host."
blur_shadow       = "niri layer-rule blur/shadow for eww layers (template commented in niri config)"
