Skip to content

What is archix?

archix is a system configuration tool for Arch Linux and Arch-based distros. CachyOS is the first-class target, and EndeavourOS works too. You describe the whole machine in Lua: packages from the official repos, the AUR and third-party repos like CachyOS, plus /etc files, systemd units, users, kernel parameters and dotfiles. archix makes the system match that description, records exactly what it installed in a lockfile, and keeps every switch as a generation you can roll back to.

If you know NixOS, the idea is familiar: a declarative config, a lockfile and rollback. The difference is that archix runs on Arch’s real packages and the AUR. There is no Nix store, no derivations and no second package ecosystem to learn.

/etc/archix/lua/hosts/desktop.lua
return {
repos = { "core", "extra", "multilib" },
packages = { "firefox", "steam", "neovim" },
programs = { kitty = { enable = true, settings = { font_size = 11 } } },
}
Terminal window
$ sudo archix switch

That’s the loop: edit Lua, switch, and roll back if you don’t like the result.

Declared

One Lua config describes every machine you own. Modules declare typed options, so a typo is an error with a suggestion, not a setting that silently does nothing.

Locked

archix.lock records the exact version of every package: official ones against a dated Arch Linux Archive snapshot, AUR ones by commit. Commit the lock and every machine gets the same versions.

Reversible

Every switch becomes a generation with its own boot entry. Roll back from a terminal, or pick an older entry at boot. btrfs makes it instant; ext4 works too.

Your config lives in /etc/archix by default and is laid out like a neovim config: an init.lua, one file per host, and modules you share between hosts. Options have types, defaults and descriptions, and archix rejects anything it doesn’t know:

Terminal window
$ archix diff
error: `programs.kity`: option does not exist (set in lua/hosts/desktop.lua); did you mean `programs.kitty`?

Evaluation is pure. Your Lua can’t run commands or read random files, so the same config and lock give the same system on every run. Read more in Configuration.

Arch is a rolling release. “Install git” means something different every day. archix pins your official packages to one day of the Arch Linux Archive, so “install git” means “install git as it was on 2026-10-14”, for as long as you want it to:

archix.lock
[hosts.desktop]
date = "2026-10-14"
repos = ["core", "extra", "multilib"]
declared = ["firefox", "git", "neovim", "steam"]
[hosts.desktop.packages]
git = { version = "2.51.0-1", repo = "extra", file = "git-2.51.0-1-x86_64.pkg.tar.zst", sha256 = "e6674e96c7bbc318a40c1fd0008a6b00688683ce3d1b324544ebc9380885d098", explicit = true }

You move forward when you choose to, with archix update. Read more in The lockfile.

A switch first prepares everything (downloads, AUR builds, rendered files, dependency checks) without touching the system. Only then does it apply. The result is a generation: the lock, the rendered files, the package files and the git commit of your config. If a generation turns out bad, archix rollback takes you back. If it won’t boot, pick the previous entry in systemd-boot. Read more in Generations and rollback and Safety.

pacman still does the installing. archix reads package state through libalpm and runs transactions through the pacman binary. You can keep using pacman -Syu whenever you like. A pacman hook notices, and the next switch asks whether to adopt the change into the lock or revert to it. See pacman and yay.

yay and paru are replaced. archix is an AUR helper with the flags you already type: archix -S, archix -Ss, archix -Syu, archix -R, and bare archix for a full update. The difference is that AUR packages are built in a clean chroot, cached, locked by commit and added to your config. See The AUR.

NixOS is the inspiration. Priorities, the module system and the generation model will feel familiar, and archix’s priorities even use the same numbers. See Coming from NixOS.