takana

takana · el martillotakana · the hammer

takana

Un Linux mutable que puedes romper y recuperar, manteniendo su pureza hasta el último bit. A mutable Linux you can break and recover, its purity intact down to the last bit.

01 · descargar01 · download

DescargarDownload

un archivoone file

imagen USBUSB image

desde el códigofrom source

$ git clone https://git.gioser.net/sergio/takana.git
$ cd takana && cargo build --release
$ ./target/release/takana --help

02 · las decisiones02 · the decisions

Trece decisiones, y contra qué se tomaronThirteen decisions, and what they were taken against

Cada una se abre: en qué se aparta de lo habitual, qué implica por dentro, y qué quiere decir sin jerga. Each one opens: how it departs from the usual, what it involves under the hood, and what it means without jargon.

tawasuyu tawasuyu el escritorio y la suite, encima the desktop and the suite, on top EL PISO DE ARRIBA THE UPPER FLOOR Tu máquina, mutable Your machine, mutable /bin · /lib · /etc reales — se rompe, se prueba, se vuelve atrás a real /bin · /lib · /etc — break it, try it, go back hidratación hydration enlaces duros desde el almacén hard links from the store diario journal lo que cambias a mano, registrado what you change by hand, recorded EL PISO DE ABAJO THE LOWER FLOOR La fábrica, cerrada The factory, closed compila desde el código fuente, aislada y sin red builds from source code, sandboxed and offline el almacén the store cada artefacto por su hash BLAKE3 every artefact by its BLAKE3 hash
01Una fábrica cerrada abajo, tu máquina de siempre arribaA closed factory below, your usual machine above
Frente a lo habitualCompared to the usual
Hay que elegir: una distro inmutable, que da reproducibilidad y te quita la terminal, o una clásica, que te la deja y no sabe decir de dónde salió un binario.You have to choose: an immutable distro, which gives reproducibility and takes the terminal away, or a classic one, which leaves it to you and cannot say where a binary came from.
TécnicamenteTechnically
Abajo, compilación aislada y direccionada por hash BLAKE3, sin efectos de borde. Arriba, un Linux con /bin, /lib y /etc de verdad; los binarios se proyectan del almacén por enlaces duros, normalizados para no arrastrar rutas internas. El puente —la hidratación— va en un solo sentido.Below, sandboxed builds addressed by BLAKE3 hash, with no side effects. Above, a Linux with a real /bin, /lib and /etc; binaries are projected from the store by hard links, normalised so they carry no internal paths. The bridge — hydration — goes one way only.
En simpleIn plain words
La parte que tiene que ser exacta lo es, y la parte donde trabajas sigue siendo un Linux normal. Lo demás de esta lista sale de ahí.The part that has to be exact is exact, and the part where you work is still an ordinary Linux. Everything else on this list follows from that.
02Se instala con un archivo, sin ISO y sin redIt installs from one file, no ISO and no network
Frente a lo habitualCompared to the usual
Lo normal es bajar un ISO, grabarlo en un pendrive, y que el instalador se baje los paquetes mientras instala — justo en la máquina que todavía no tiene red.The usual is downloading an ISO, burning it to a stick, and having the installer fetch packages while it installs — on the very machine that has no network yet.
TécnicamenteTechnically
El fichero es una cabecera POSIX de shell con el sistema entero pegado detrás: comprueba su propio contenido, se carga en memoria y salta con kexec al instalador, que suelta el disco de la máquina viva para poder formatearlo. Nada se descarga durante la instalación. Si ese kernel no deja saltar, lo dice y nombra cuál de las tres condiciones falta; para ese caso está la imagen USB, que es el mismo instalador por otro camino.The file is a POSIX shell header with the whole system appended: it verifies its own contents, loads into memory and jumps with kexec into the installer, which releases the live machine's disk so it can be formatted. Nothing is downloaded while installing. If that kernel will not allow the jump, it says so and names which of the three conditions is missing; for that case there is the USB image, the same installer arriving another way.
En simpleIn plain words
Un archivo, permiso de ejecución, y ya. Se puede leer con head antes de correrlo, no necesita internet, y el disco desde el que arrancaste nunca aparece como destino.One file, make it executable, done. You can read it with head before running it, it needs no internet, and the disk you booted from is never offered as a target.
03Trae su propio escritorio, y el ecosistema que va encimaIt brings its own desktop, and the ecosystem above it
Frente a lo habitualCompared to the usual
Una distribución suele ensamblar escritorios ajenos y ahí termina su alcance: lo que corre encima es problema de otro proyecto.A distribution usually assembles other people's desktops and that is where its scope ends: what runs on top is another project's problem.
TécnicamenteTechnically
mirada es el escritorio propio y viaja en la imagen. Encima está tawasuyu, que no es un añadido: comparten el almacén direccionado por contenido, el grafo de arranque y arje —su proceso número uno— como init de las imágenes. Y los cuatro escritorios conocidos están construidos igual, con su clausura sellada: KDE, GNOME, COSMIC y sway.mirada is the project's own desktop and travels in the image. Above it sits tawasuyu, which is not an add-on: they share the content-addressed store, the boot graph and arje — its process number one — as the init of the images. And the four well-known desktops are built the same way, with their closure sealed: KDE, GNOME, COSMIC and sway.
En simpleIn plain words
No es sólo una base para que otros pongan cosas encima: el escritorio y lo que corre en él son parte del mismo proyecto y están pensados juntos. Si prefieres uno conocido, también está.It is not just a base for others to put things on: the desktop and what runs on it belong to the same project and are designed together. If you prefer a well-known one, it is there too.
04Todo se compila desde fuente, y la fuente está clavadaEverything is compiled from source, and the source is pinned
Frente a lo habitualCompared to the usual
Una distro normal te entrega un binario que compiló otra persona en otra máquina; lo que verificas es la firma de quien lo subió, no lo que hay adentro.A normal distro hands you a binary somebody else compiled on another machine; what you verify is the signature of whoever uploaded it, not what is inside.
TécnicamenteTechnically
Cada receta fija su fuente por commit de git o por sha256 — nunca contra una rama viva. El hash del artefacto se deriva de la receta entera: fuente, compilador, banderas, fases de build y los hashes de cada dependencia. takana hash lo calcula sin construir nada.Each recipe pins its source by git commit or sha256 — never against a live branch. The artefact hash is derived from the whole recipe: source, compiler, flags, build phases and the hash of every dependency. takana hash computes it without building anything.
En simpleIn plain words
Nadie te manda comida hecha: te manda la receta y la cocina tu máquina. Y la receta dice exactamente qué ingredientes, no «harina» a secas.Nobody sends you cooked food: they send the recipe and your machine cooks it. And the recipe names the exact ingredients, not just «flour».
05Reproducible bit a bit — y cuando no, se dice por quéBit-for-bit reproducible — and when it isn't, it says why
Frente a lo habitualCompared to the usual
Compilar el mismo paquete dos veces casi nunca da el mismo fichero, y en la práctica nadie lo comprueba: la diferencia se acepta como normal.Building the same package twice almost never yields the same file, and in practice nobody checks: the difference is accepted as normal.
TécnicamenteTechnically
El build corre aislado con bubblewrap, sin red y con la fecha fijada. Cuando dos artefactos difieren, why-differs desciende sólo por donde los hashes no coinciden y nombra la causa: un mtime dentro de un .gz, la cabecera ar de un .a, qué sección ELF cambió, una ruta del árbol de build filtrada al binario.Builds run sandboxed with bubblewrap, without network and with a fixed date. When two artefacts differ, why-differs descends only where the hashes disagree and names the cause: an mtime inside a .gz, the ar header of a .a, which ELF section changed, a build-tree path leaked into the binary.
En simpleIn plain words
Si dos personas hacen el mismo paquete, tiene que salir el mismo fichero. Y si sale distinto, el sistema te dice en qué — no te deja adivinando.If two people build the same package, the same file must come out. And if it doesn't, the system tells you where it differed — it doesn't leave you guessing.
06Un paquete es una receta, no un binarioA package is a recipe, not a binary
Frente a lo habitualCompared to the usual
El repositorio te manda el programa ya hecho, así que hay que confiar en el repositorio — y en cada espejo suyo.The repository sends you the finished program, so you have to trust the repository — and every one of its mirrors.
TécnicamenteTechnically
El índice va firmado con Ed25519 y ancla el digest de cada paquete. install resuelve el nombre, verifica la firma, reconstruye desde fuente y recién entonces hidrata. --repo acepta varios orígenes separados por comas y los prueba en orden.The index is Ed25519-signed and anchors each package's digest. install resolves the name, verifies the signature, rebuilds from source and only then hydrates. --repo takes several comma-separated origins and tries them in order.
En simpleIn plain words
El sitio del que lo bajas no necesita ser de fiar, porque no te da el resultado: te da las instrucciones, y se comprueba que sean las firmadas.The site you download from doesn't need to be trustworthy, because it doesn't give you the result: it gives you the instructions, and they are checked against the signed ones.
07Se reconstruye a sí misma, sin creerle a ningún binarioIt rebuilds itself, without trusting anybody's binary
Frente a lo habitualCompared to the usual
El compilador de tu distro salió de un binario que compiló otra máquina, que salió de otro, hacia atrás sin fondo. Ese primer eslabón se cree por fe.Your distro's compiler came from a binary built by another machine, which came from another, backwards without end. That first link is taken on faith.
TécnicamenteTechnically
Cadena de Rust pura de mrustc a rustc, kernel Linux compilado acá que arranca la máquina, y el toolchain reconstruyéndose a sí mismo dentro de una máquina virtual. Hecho dos veces: mismo resultado, bit por bit.A pure Rust chain from mrustc to rustc, a Linux kernel built here that boots the machine, and the toolchain rebuilding itself inside a virtual machine. Done twice: same result, bit for bit.
En simpleIn plain words
La distro se puede fabricar a sí misma casi desde cero. No queda un eslabón que haya que aceptar sin poder mirarlo.The distro can manufacture itself from near zero. No link is left that you must accept without being able to look at it.
08musl, estático, y zig cc de compiladormusl, static, and zig cc as the compiler
Frente a lo habitualCompared to the usual
Lo habitual es glibc y enlazado dinámico: actualizar una librería puede romper un programa que no tocaste, y descubrirlo al arrancarlo.The usual is glibc and dynamic linking: updating one library can break a program you never touched, and you find out when you launch it.
TécnicamenteTechnically
zig cc es el compilador por defecto del laboratorio —trae los headers y la libc de cada target, sin cross-toolchain a mano— y es reemplazable receta por receta. El rootfs del lab se ancla a una imagen pineada por sha256, no se resuelve con un gestor de paquetes.zig cc is the lab's default compiler — it brings each target's headers and libc, with no hand-built cross-toolchain — and is replaceable recipe by recipe. The lab rootfs is pinned to an image by sha256, not resolved by a package manager.
En simpleIn plain words
Cada programa se lleva sus piezas adentro, así que tocar uno no rompe a los demás. Y el código de la libc es lo bastante chico como para leerlo.Each program carries its pieces inside, so touching one doesn't break the others. And the libc's code is small enough to actually read.
09Sin systemd: el init es propio y el arranque es un grafoNo systemd: the init is our own and boot is a graph
Frente a lo habitualCompared to the usual
El arranque lo gobierna un binario grande con formato de unidades propio y un registro binario que hay que consultar con su propia herramienta.Boot is governed by a large binary with its own unit format and a binary log you must query with its own tool.
TécnicamenteTechnically
arje-zero es el proceso número uno, estático contra musl. Los servicios se declaran en Cards JSON, con supervisión y reintento con backoff, y hablan por un socket Unix con SO_PEERCRED. El menú de arranque es la navegación del grafo de estados del sistema.arje-zero is process number one, statically linked against musl. Services are declared in JSON Cards, with supervision and backoff restarts, and talk over a Unix socket with SO_PEERCRED. The boot menu is navigation of the system's state graph.
En simpleIn plain words
Lo que enciende tu máquina se puede leer con un editor de texto y contar de memoria. No hay una pieza central que decida por ti y cueste inspeccionar.What starts your machine can be read in a text editor and held in your head. There is no central piece deciding for you that is hard to inspect.
10Romper a mano está permitido — y se puede volverBreaking things by hand is allowed — and you can come back
Frente a lo habitualCompared to the usual
Las inmutables no te dejan tocar sin aprender antes un lenguaje declarativo; las clásicas te dejan tocar y después el gestor de paquetes pierde el rastro de lo que hiciste.Immutable ones won't let you touch anything until you learn a declarative language; classic ones let you touch and then the package manager loses track of what you did.
TécnicamenteTechnically
try monta un overlay sobre el FHS real; commit lo promueve y discard lo tira. Un demonio fanotify registra cada cambio a mano y calcula el delta contra la base limpia; export lo convierte en un manifiesto compartible.try mounts an overlay over the real FHS; commit promotes it and discard throws it away. A fanotify daemon records every hand edit and computes the delta against the clean base; export turns it into a shareable manifest.
En simpleIn plain words
Prueba lo que quieras: si sale mal se desmonta la capa y listo. Y lo que cambiaste a mano queda anotado solo — el registro es tu configuración, sin que hayas escrito ninguna.Try whatever you want: if it goes wrong the layer is unmounted and that's it. And what you changed by hand gets written down on its own — the log is your configuration, without you having written one.
11Wayland y nada más; el audio es PipeWireWayland and nothing else; audio is PipeWire
Frente a lo habitualCompared to the usual
Casi todas arrastran X11 y varios servidores de audio a la vez por compatibilidad, y mantienen los dos caminos para siempre.Almost all of them drag X11 and several audio servers along for compatibility, and maintain both paths forever.
TécnicamenteTechnically
Ninguna receta del catálogo publica libGL.so de escritorio ni GLX: las aplicaciones de gráficos van por EGL, y a las que no sabían hubo que portarlas. El audio es pipewire con wireplumber, como servicio de sesión, sin capa de compatibilidad permanente.No recipe in the catalogue ships a desktop libGL.so or GLX: graphics applications go through EGL, and the ones that didn't know how had to be ported. Audio is pipewire with wireplumber, as a session service, with no permanent compatibility layer.
En simpleIn plain words
Se eligió el camino nuevo y se borró el viejo, en vez de cargar los dos para siempre. Cuesta más al principio y se paga una sola vez.The new path was chosen and the old one deleted, instead of carrying both forever. It costs more up front and is paid only once.
12Lo ajeno corre enjaulado, y fuera del almacénForeign software runs caged, and outside the store
Frente a lo habitualCompared to the usual
O se mezclan binarios de terceros con los del sistema —y ya no se sabe de dónde salió cada cosa—, o directamente no hay forma de correrlos.Either third-party binaries get mixed in with the system's — and then you no longer know where anything came from — or there is simply no way to run them.
TécnicamenteTechnically
Un rootfs de otra distribución se trae pineado por digest y corre enjaulado con bubblewrap sobre el mismo kernel, sin compartir un solo .so con el anfitrión. No entra al store: no reproduce desde fuente, y meterlo ahí haría que el almacén mienta.Another distribution's rootfs is fetched pinned by digest and runs caged with bubblewrap on the same kernel, without sharing a single .so with the host. It does not enter the store: it does not reproduce from source, and putting it there would make the store lie.
En simpleIn plain words
Lo que no se puede cocinar acá igual se usa, pero en su propia caja y sin mezclarse. Así el catálogo no dice «esto es mío» de algo que no lo es.What cannot be cooked here is still used, but in its own box and unmixed. That way the catalogue never claims as its own something that isn't.
13Hecha para que una IA la opere, con el humano decidiendoBuilt for an AI to operate it, with the human deciding
Frente a lo habitualCompared to the usual
Están pensadas para manos humanas: la automatización termina simulando a una persona —parsear salidas, adivinar formatos— y el sistema esconde su estado en bases binarias.They are designed for human hands: automation ends up simulating a person — parsing output, guessing formats — and the system hides its state in binary databases.
TécnicamenteTechnically
Todo el estado del sistema es texto plano y binarios inspeccionables con readelf u objdump; nada de bases de configuración opacas. Hay un bus por socket Unix por el que un agente dispara compilaciones, escucha fallos y propone cambios — siempre contra un overlay, nunca contra el sistema vivo.All system state is plain text and binaries inspectable with readelf or objdump; no opaque configuration databases. There is a Unix-socket bus through which an agent triggers builds, listens for failures and proposes changes — always against an overlay, never against the live system.
En simpleIn plain words
Un asistente puede entender y cambiar el sistema entero sin adivinar nada, y cada cosa que hace es reversible y queda anotada. Propone; tú dispones.An assistant can understand and change the whole system without guessing, and everything it does is reversible and recorded. It proposes; you decide.

03 · los componentes03 · the components

Qué lleva dentroWhat is inside

piezapiece versiónversion
initinitarje-zeroel proceso número uno, estático contra musl; los servicios se declaran en Cards JSONprocess number one, statically linked against musl; services are declared in JSON Cards
libcmusl 1.2.5estática por defectostatic by default
compilador del laboratoriolaboratory compilerzig cc 0.16.0reemplazable receta por receta; también hay LLVM 21.1.2 y clang 18.1.8replaceable recipe by recipe; LLVM 21.1.2 and clang 18.1.8 are there too
kernelLinux 6.16.12 · 7.1.2compilados acá; arrancan la máquina y reproducen idénticosbuilt here; they boot the machine and reproduce identically
gráficosgraphicsWayland 1.25.0 · Mesa 24.0.9sin X11 en todo el catálogono X11 anywhere in the catalogue
audioaudioPipeWire 1.2.7 · WirePlumber 0.5.15servicio de sesiónsession service
almacénstoreBLAKE31.490 artefactos direccionados por contenido1,490 artefacts addressed by content
catálogocatalogue954recetas, las 954 selladas, sin deudarecipes, all 954 sealed, no debt
paquetespackages.tkníndice firmado Ed25519; se reconstruyen desde fuente al instalarEd25519-signed index; rebuilt from source on install
herramientatooltakana 0.0.1build · hash · hydrate · install · kernel · qorpa

EscritoriosDesktops

escritoriodesktop versiónversion de su clausura, selladosof its closure, sealed
miradapropioour own41/41
KDE Plasma6.7.2430/431
GNOME48.8359/359
COSMIC1.5.0294/294
sway1.10281/281

Paquetes principalesMain packages

  • bash5.3
  • coreutils9.8
  • uutils0.9.0
  • busybox1.36.1
  • git2.54.0
  • curl8.20.0
  • openssl3.5.4
  • openssh10.3p1
  • gnupg2.4.9
  • python3.12.10
  • go1.26.4
  • rust1.97.0
  • llvm21.1.2
  • sqlite3.46.1
  • zstd1.5.7
  • ffmpeg7.1
  • vim9.2.0747
  • nano9.0
  • helix25.07.1
  • ripgrep14.1.1
  • zellij0.44.3
  • foot1.27.0
  • firefox154.0
  • atuq0.5.0

Las versiones salen de las recetas del catálogo y las cifras de docs/state/build-state.json y del almacén de la caja. No se estiman: se cuentan. Lo que sigue abierto también está escrito: consenso de reconstrucción M-de-N. Versions come from the catalogue's recipes and the figures from docs/state/build-state.json and the box's store. They are not estimated: they are counted. What is still open is written down too: M-of-N rebuild consensus.

04 · el código04 · the code

Dónde vive y cómo se llamaWhere it lives and how it is called

código · licencia MITcode · MIT licence

https://git.gioser.net/sergio/takana

paquetes · índice firmadopackages · signed index

https://takana-os.net/repo/

Cómo está repartidoHow it is laid out

  • crates/ — el CLI, el laboratorio de build, el demonio, el diario y el overlay.the CLI, the build lab, the daemon, the journal and the overlay.
  • recipes/ — el catálogo: una receta .toml por paquete.the catalogue: one .toml recipe per package.
  • docs/ — el diseño entero (SDD y ADR). Empieza por 00-vision.md.the entire design (SDDs and ADRs). Start at 00-vision.md.
  • scripts/ — la granja de compilación, la cosecha y los arneses de verificación.the build farm, the harvest and the verification harnesses.

el laboratoriothe laboratory

$ takana hash ripgrep          # el hash vigente, sin construirthe current hash, without building
$ takana build ripgrep         # compila aislado y sella en el almacénbuilds sandboxed and seals into the store
$ takana why-differs a/ b/     # nombra la causa de una diferencianames the cause of a difference

los paquetespackages

$ takana repo list   --repo https://takana-os.net/repo
$ takana repo verify --repo https://takana-os.net/repo --trust ./trust
$ takana install age --repo https://takana-os.net/repo --trust ./trust

el sistema vivothe live system

$ takana try                   # abre el overlay sobre el sistema realopens the overlay over the real system
$ takana journal               # lo que cambiaste a mano, registradowhat you changed by hand, recorded
$ takana commit                # promueve · discard lo descartapromotes · discard throws it away