Skip to content
archix is being rescoped. Don't install it yet.The released archix-git is the old model, which replaced packages and boot entries itself and broke a real install. The new design leaves packages to pacman and libalpm and rollback to snapper, and adds a diff that shows exactly what a switch will change. These docs describe the old model until the new one ships.Read the new scope.

Quick start

This page takes you from a freshly installed archix to a declared, locked system with a few generations and snapshots, one of which you’ve gone back to. It takes about fifteen minutes, most of it reading what archix init found.

You need archix installed (Installation) and root access.

You don’t write your first config by hand. archix init reads your running system and writes a config and a lock that describe it exactly, down to the version of every installed package. It changes nothing on the machine except the config directory.

Terminal window
$ sudo archix init

It opens a full-screen wizard in nine steps: Welcome, Config, Packages, System, Config files, Boot, Generations, Dotfiles and Review. Each step shows what init found and asks what it can’t decide for you, with the recommended answer already chosen. You can go back and change any answer, and nothing is written until you choose Write the config › on Review. Here’s the Packages step:

archix init host desktop · step 3 of 9
✓ Welcome │ Packages
✓ Config │ What's installed, and what happens to what isn't declared.
› Packages │
System │ ✓ repos core, extra, multilib
Config files │ ✓ 86 packages declared, 3 from the AUR
Boot │ ✓ 2 Flatpak apps, locked to their installed commits: com.spotify.Client, org.mozilla.firefox
Generations │ · 2 dependencies that nothing needs any more: python-pip, rust
Dotfiles │
Review │ Dependencies nothing needs any more
│ › ● keep them (listed in ignored_packages)
│ ○ let the first switch remove them
│
│ Later, when you install something with plain pacman or yay
│ ● the next switch asks whether to add it to installed.lua or keep it untracked (recommended)
│ ○ the next switch adds it to installed.lua without asking
│ ○ the next switch keeps it installed, untracked: never removed, never declared
│
│ [x] Show each AUR build recipe and ask before trusting it
│
│ If a locked AUR version can't be built any more
│ ● ask, defaulting to the nearest newer version (recommended)
│ ○ take the nearest newer version
│ ○ take the nearest older version
│
│ ‹ Back Next: System ›
↑↓ move · enter choose · esc back · ←→ step · q quit

The sidebar marks the steps you’ve seen with ✓ and the current one with ›, and the header shows the host and the step. Focus moves one line at a time: every option of a choice, each [x] setting, each text field, each checklist entry, then the buttons. › marks the focused line, and the bottom line says what enter does there.

Key What it does
↑ ↓, tab, shift-tab Move the focus to the next or previous line. From Next, ↓ reaches ‹ Back.
enter, space Act on the focused line: pick an option, switch a setting or checklist entry on or off, or start editing a text field. On a button, press it.
← → Go to the previous or next step, like the buttons. On Review, → only focuses Write the config ›; it never writes.
End Focus the Next button.
esc Go back a step.
a, n In a checklist, select all or none.
r In a checklist, go back to the recommended entries: the recommended files in Config files and dotfiles in Dotfiles, everything in System’s lists.
q, ctrl-c Quit without writing anything: init was cancelled; nothing was written.

Text fields (the config location and the generation limits) start empty, showing their default in gray, such as /etc/archix (default); left empty, they keep it. They’re edited in place: press enter on one, type, then enter keeps the value and esc puts the old one back. Only while you’re editing do letters and digits go into the field, and the bottom line reads type to edit · enter done · esc cancel. Next and → refuse to leave a step whose text fields are invalid, and shows the problem above the key hints, such as ! the config directory must be an absolute path. Steps with nothing to answer (Welcome and Review) start on Next, and ↑ ↓ scroll their content; every other step starts on its first field. Answers stay as you left them when you move between steps.

What each step decides:

  1. Welcome. What init found: how many packages to declare and how many come from the AUR, config files, user accounts and Flatpak apps. Nothing to answer.

  2. Config. Where should the config live? shows /etc/archix (default) until you type something else. Any directory works, such as a clone of your own repo. If you pick another directory, /etc/archix becomes a symlink to it, and a config inside your home is handed over to you, the whole tree including the .git below, so you can edit and commit it without sudo. When git is installed, Make it a git repository is on, and init runs git init and git add -A in the config directory; nothing is committed. Write files read-only, like the Nix store (apps can't change them; a switch puts them back) is off; turn it on to have archix write the files it manages read-only, as NixOS does, and put them back on every switch. See Read-only files.

  3. Packages. Your explicitly installed packages, from the repos and the AUR, are declared in installed.lua. Third-party repos in your pacman.conf, such as CachyOS’s or chaotic-aur, are declared as they are, and init asks what to do if a locked package disappears from one (see Third-party repos). Foreign packages that aren’t on the AUR, built by hand or gone from it, stay in ignored_packages unless you tick them, which rebuilds them as recipes in pkgbuilds/ from their installed files, kept out of the config; one whose files changed since pacman installed it can’t be, and a ! line says why. Orphaned dependencies can be kept in ignored_packages or left for the first switch to remove. Later, when you install something with plain pacman or yay sets drift: ask, add or keep. With AUR packages, there are also review and missing versions. System-wide Flatpak apps are declared in flatpak.apps, with any remote other than Flathub, and locked to the commits they’re installed at. Apps installed with --user are left out, and so are apps whose remote is gone, with a ! line. See Flatpak and AppImages.

  4. System. Four checklists of what init takes over as it is, all ticked: Settings (hostname, timezone, locales and keymap, but only where the option would write exactly what’s on disk now), Users (regular users, uid 1000 to 59999, each with uid, shell and groups, declared with their real groups, shell, home and description so declaring them changes nothing), Groups (regular groups, with their gid) and Services that differ from their preset (each enabled or disabled). Untick anything archix should leave alone; it isn’t declared. Passwords stay where they are; archix never manages them.

  5. Config files. The /etc files you changed: package config files edited since they were installed, and files nobody owns in well-known directories such as /etc/systemd/system, /etc/sysctl.d and /etc/udev/rules.d. Files that hold secrets are never listed or copied, only counted: · 3 files that hold secrets stay out of the config and aren't listed. The rest is one scrollable checklist, each file tagged with why it’s there: recommended, then changed from its package's version or not from any package. Recommended files, such as /etc/fstab and anything hand-written, start ticked; the others are mostly changed by package install scripts. See Safety.

  6. Boot. What init found about booting, one line each: boot entries on /efi, kernel linux when systemd-boot is installed and the kernel command line has root=, with the command line below and Manage booting with systemd-boot, on. With it, archix writes an entry for the current system and for recent snapshots, with boot counting and automatic fallback. Left off, switches and snapshots still work, with no boot entries. Without systemd-boot, the step says no systemd-boot found; archix's boot entries and automatic fallback need it (bootctl install). On a machine Limine boots, it says archix writes no Limine entries, and asks under Limine boots this machine:

    • stay on Limine: a broken update falls back only by picking a snapshot by hand
    • move to systemd-boot for automatic fallback: Limine stays installed and first until a boot through systemd-boot counts as good

    See Moving from Limine to systemd-boot. With systemd-boot, the step also runs the health check once and shows what it would conclude on this machine now, so a unit that fails at every boot doesn’t surprise you later.

  7. Generations. Generations gc always keeps, shown as 10 (default), and …and any younger than this many days, shown as 30 (default). Leave them empty for the defaults; anything you type has to be a whole number. On btrfs, Rollbacks asks whether to take a snapshot before every switch and pacman run, on: a btrfs snapshot before every switch and pacman run, to roll back to or boot (recommended) or off; on ext4 the Review step says rollbacks are not available and why. Two more questions appear only where they apply:

    • The root is btrfs's top level, which no snapshot can replace, when the root isn’t in a subvolume: move it into an @ subvolume at the boot after the first switch, or leave it with rollbacks off. Moving needs archix to manage booting. See A root at the top level.
    • snap-pac also snapshots every pacman run, when snap-pac is installed: keep both: snapper and archix each snapshot pacman runs, or mask snap-pac's pacman hooks, so only archix does; snapper's configs and snapshots stay as they are. Never asked on Limine, where snapper’s snapshots are the bootable ones. See Other snapshot tools.
  8. Dotfiles. Pick a user if there’s more than one, then choose entries from ~/.config and top-level dotfiles. Recommended ones, such as your shell’s rc files, .gitconfig, and editor, terminal and window manager configs, start ticked; untick everything to bring in none. Caches, browsers and app state aren’t offered, and credentials such as ~/.ssh are only counted. Ticked entries are copied into the config’s home/. Directories become live links, and so do files, unless you turned on read-only files, which makes them read-only copies instead. Files their app replaces on save, such as KDE’s *rc files and mimeapps.list, always become writable copies, since a link wouldn’t survive the app’s save. See Dotfiles and apps.

  9. Review. Everything init will write, one line each: the config location, packages, what the next switch does with undeclared packages, unused packages, Flatpak apps, accounts, services (3 of 4 when you unticked one), config files, boot, generations, rollbacks (a snapshot before every switch and pacman run) and dotfiles. Write the config › writes it.

Then the wizard closes, and init prints the rest in the terminal. With AUR review on, it shows each AUR build recipe and asks before trusting it. It finds the Arch Linux Archive snapshot that matches the most installed versions and pins every package that differs from it, older ones included, so the lock is exactly what you have (see The lockfile). Then it shows what the first switch would change, which should be nothing:

── Lock ────────────────────────────────────────
· finding the archive snapshot closest to what's installed
✓ 212 packages locked to the 2026-10-09 snapshot
· held at their installed version instead: mesa
✓ 2 Flatpak apps locked to their installed commits
── Boot ────────────────────────────────────────
✓ boot entries on /efi, kernel linux
✓ each switch applies in place, live, with no reboot
✓ a boot counts as good once it reaches its default target with no unit failed that hadn't failed before and the display manager, if one is enabled, active; on this machine now:
passes ...
── Result ──────────────────────────────────────
✓ the system matches the lock and the config: the first switch changes nothing
Config written to /etc/archix
init.lua loads this host
lua/hosts/desktop/init.lua settings, users, services and files
lua/hosts/desktop/installed.lua packages; archix -S and -R edit it
files/desktop/ copies of the managed config files
archix.lock the exact package versions
Next: look it over, then run sudo archix switch

For scripts, sudo archix init --defaults takes every recommended answer without opening the wizard, so it needs no terminal. It ticks the recommended config files, never imports dotfiles, makes the config directory a git repository when git is installed, and prints what it captured in Packages, System, Config files, Boot and Generations sections before the same Lock and Result. With --defaults, rollbacks are on wherever the root allows them, snap-pac is left as it is, and a Limine machine stays on Limine. The config files you didn’t get are counted, so you can run the wizard later to pick them.

There are two exceptions to an empty Result. Dotfiles you imported are listed, because the first switch backs up the originals and replaces them with links into the config. And archix declares the boot tooling it needs, mkinitcpio, systemd-ukify and dosfstools, so the Result lists them as installs if they’re missing. Either way, the section starts with ! the first switch would still change these:.

The config is laid out like a neovim config:

Terminal window
$ tree /etc/archix
/etc/archix
├── archix.lock
├── init.lua
├── files
│ └── desktop
│ └── etc
│ ├── fstab
│ ├── mkinitcpio.conf
│ ├── pacman.d
│ │ └── mirrorlist
│ └── sysctl.d
│ └── 80-swappiness.conf
└── lua
└── hosts
└── desktop
├── init.lua
└── installed.lua

init.lua imports the host that matches your hostname. lua/hosts/<hostname>/init.lua holds what init captured:

lua/hosts/desktop/init.lua
-- Written by `archix init` from this machine; edit it freely.
return {
hostname = "desktop",
timezone = "Europe/Berlin",
repos = { "core", "extra", "multilib" },
ignored_packages = { "nvidia-dkms-custom" },
flatpak = { apps = { "com.spotify.Client", "org.mozilla.firefox" } },
users = {
me = { uid = 1000, groups = { "wheel" }, shell = "/usr/bin/zsh", description = "Me" },
},
services = { ["bluetooth.service"] = true, ["sshd.service"] = true },
files = {
["/etc/fstab"] = { source = "files/desktop/etc/fstab" },
["/etc/sysctl.d/80-swappiness.conf"] = { source = "files/desktop/etc/sysctl.d/80-swappiness.conf" },
-- ...
},
kernel_params = { "root=UUID=0a3c5e1f-6b2d-4f7a-9c8e-1d2b3a4c5e6f", "rw", "quiet" },
boot = { loader = "systemd-boot", microcode = { "amd-ucode.img" } },
}

Your explicitly installed packages, from the repos and the AUR, are in installed.lua. The file is yours to edit freely; archix install and archix remove add and remove names there too, as its first line says. Dependencies aren’t listed; the lock records them.

lua/hosts/desktop/installed.lua
-- This host's packages. Edit freely; `archix install` and `archix remove` add and remove names here too.
return {
packages = {
"base",
"firefox",
"linux",
-- ...
},
}

archix.lock holds the snapshot date and every package’s exact version. Packages that didn’t match the snapshot are listed under pinned, and Flatpak apps get their own table with the commit each is installed at:

archix.lock
[hosts.desktop]
date = "2026-10-09"
repos = ["core", "extra", "multilib"]
declared = ["archix", "base", "dosfstools", "firefox", "linux", "mkinitcpio", "neovim", "steam", "systemd-ukify"]
pinned = ["mesa"]
[hosts.desktop.packages]
firefox = { version = "144.0-1", repo = "extra", file = "firefox-144.0-1-x86_64.pkg.tar.zst", sha256 = "37895f9d195203f4981ee730bec23c4079d10b5b53fc2c3e69db37c1bfed1257", explicit = true }
# ...
[hosts.desktop.flatpak]
"com.spotify.Client" = { remote = "flathub", ref = "app/com.spotify.Client/x86_64/stable", commit = "5f8806197a2b3c4d6e8f0a1b2c3d4e5f60718293a4b5c6d7e8f9012a3b4c5d6e" }
"org.mozilla.firefox" = { remote = "flathub", ref = "app/org.mozilla.firefox/x86_64/stable", commit = "0bb3a9e40c1f8d2e4b6a7c9d1e3f5a7b9c0d2e4f6a8b1c3d5e7f9a0b2c4d6e8f" }

git is optional, but worth it. When the config directory is a git repo, every generation records the commit it was built from. If git is installed and you left Make it a git repository on, init already ran git init and git add -A, so commit now, from the config directory (with sudo if it’s the root-owned /etc/archix):

Terminal window
$ git add -A && git commit -m "Capture desktop with archix init"
Terminal window
$ sudo archix switch
set up rollbacks: the @archix and @varlib subvolumes and their fstab lines; snapshots start after the next reboot
:: the plan since the last generation archix applied
...
:: no generation applied by archix yet; this one records config tree 5d7b21c4e9a0
apply 1 change? [Y/n]
the root is set up for rollbacks; snapshots start after the next reboot, once @archix is mounted
:: applying generation 1
:: building the boot images
switched to generation 1 (snapshot 2026-10-09)

No packages change. On btrfs, the first switch lays the root out for snapshots: an @archix subvolume mounted at /.archix for snapshots and archix’s records, and @varlib for /var/lib, so a rollback doesn’t take services’ data back with the system. /var/lib moves into @varlib at the next boot, before any service starts, and snapshots start from that boot. A first switch that would also change packages stops before them for that reboot. pacman’s database, DKMS’s state and archix’s own stay on the root, bound over /var/lib/pacman, /var/lib/dkms and /var/lib/archix, so they always match the packages a snapshot holds. The files archix took over are backed up first, so taking one out of the config later puts the original back. It also writes the boot menu, archix’s pacman hooks and the rescue entry.

Reboot once, so /var/lib moves and the machine starts from archix’s entry. From then on, every switch takes a snapshot of the root before it applies, and so does every plain pacman transaction. Your system looks the same as before, but now it’s described, locked and reversible. On ext4, or with rollbacks off, there’s nothing to lay out and no reboot to make: archix manages the config, with no snapshots.

Add a package to your host file. Lists from every module are concatenated, so this adds to what’s in installed.lua:

lua/hosts/desktop/init.lua
return {
hostname = "desktop",
packages = { "htop" },
-- ...
}

Ask archix what that would do before doing it:

Terminal window
$ archix diff
resolving 87 declared packages against the 2026-10-09 snapshot
note: archix.lock is out of date for desktop; showing a fresh resolution
snapshot 2026-10-09: 213 packages
install htop 3.4.1-1

The lock still has your old package set, so diff resolves the new one on the fly. htop comes from the same 2026-10-09 snapshot as everything else, so adding it doesn’t upgrade anything else. That is the point of the snapshot.

Now switch:

Terminal window
$ sudo archix switch
resolving 87 declared packages against the 2026-10-09 snapshot
+ htop 3.4.1-1
213 packages locked
wrote /etc/archix/archix.lock
install htop 3.4.1-1
:: the plan since the last generation archix applied
package + htop 3.4.1-1
:: the config since the last generation archix applied
archix.lock | 1 +
lua/hosts/desktop/init.lua | 1 +
2 files changed, 2 insertions(+)
...
apply 2 changes? [Y/n]
downloading htop-3.4.1-1-x86_64.pkg.tar.zst
snapshot 1 holds the system as it was before this change
:: applying generation 2
...
switched to generation 2 (snapshot 2026-10-09)

switch updated the lock for you, showed what changes, in the packages and in the config since the last switch, and applied it once you said yes, live: htop is there as soon as it returns. The prompt shows the config’s diff every time, so a change you didn’t make, by you or anything running as you, doesn’t slip in unseen; see Safety. Snapshot 1 holds the system from before, and has a boot entry. sudo archix install htop would have done the same, writing the name to installed.lua instead of your host file. Commit the change:

Terminal window
$ git commit -am "Add htop"

To move to today’s packages, update the lock to the newest archive snapshot, then switch. update only rewrites the lock; nothing is installed until you switch:

Terminal window
$ sudo archix update
resolving 87 declared packages against the 2026-10-15 snapshot
snapshot 2026-10-09 -> 2026-10-15
~ linux 7.2.8.arch1-1 -> 7.2.9.arch1-1
~ mesa 1:25.3.0-1 -> 1:25.3.1-1
213 packages locked
wrote /etc/archix/archix.lock
$ sudo archix switch
...
the running kernel was replaced: reboot to run the new one (the running one's modules stay loadable until then)
...
switched to generation 3 (snapshot 2026-10-15)

Everything but the kernel is in use right away; reboot when it suits you to run the new kernel. The current system’s entry now has two tries: if the new kernel doesn’t boot, or the boot doesn’t count as good, systemd-boot falls back to snapshot 2, how the system last booted fine, with nobody at the machine. You can also use sudo archix -Syu, or just sudo archix, which does both in one go, like yay. See pacman and yay.

Say the new mesa breaks your games. There are two ways back.

Revert, live, to the previous generation’s record:

Terminal window
$ sudo archix revert
reverting to generation 2 (snapshot 2026-10-09), applying its record live, in place
downgrade linux 7.2.9.arch1-1 -> 7.2.8.arch1-1
downgrade mesa 1:25.3.1-1 -> 1:25.3.0-1
revert to generation 2 (snapshot 2026-10-09)? [Y/n]
snapshot 3 holds the system as it was before this change
:: applying generation 2 (snapshot 2026-10-09)
...
reverted to generation 2 (snapshot 2026-10-09). archix.lock is unchanged, so the next `archix switch` returns to the config

archix reinstalls generation 2’s exact packages from its cache or the Arch Linux Archive, and puts back its files, users and services. Anything that generation doesn’t declare stays as it is.

Or keep a snapshot instead, which replaces the whole root from the next boot. Before the revert above, archix generations lists the generations, then the snapshots by the state each holds:

Terminal window
$ archix generations
1 2026-10-09 18:40 UTC snapshot 2026-10-09 212 packages config 8c1f0e2a7b
2 2026-10-09 18:52 UTC snapshot 2026-10-09 213 packages config 3f2a9c1e07
* 3 2026-10-15 08:55 UTC snapshot 2026-10-15 213 packages config 5d7b21c4e9
snapshots, by the state each holds:
1 2026-10-09 18:52 UTC switch system as of tree 8c1f0e2a7b41 (generation 1), before switch to tree 3f2a9c1e07d2
2 2026-10-15 08:55 UTC switch system as of tree 3f2a9c1e07d2 (generation 2), before switch to tree 5d7b21c4e9a0
$ sudo archix rollback 2

Snapshot 2 becomes the root at the next boot, and the running system is kept as a snapshot of its own, so archix rollback --cancel before then, or keeping that one later, undoes it. See Revert and keep for which to use.

Either way, the system changes, not your config. Your archix.lock still says 2026-10-15, so the next archix switch would apply it again. To stay back, revert the lock in git, or move it with archix update --to 2026-10-09.

  • Configuration explains modules, imports and priorities, so you can split your host file into shared modules.
  • The AUR shows archix install, review and the chroot builds.
  • Dotfiles and apps covers programs.* and format writers.
  • Recovering a broken system covers what to do when an update or a config breaks the boot.