Rethinking the Machine

An Experiment in Reproducible Linux

What if we could configure our computers simply by using them and then reproduce it everywhere?

What if you could create a reproducible Linux environment without writing configuration files? Just use your computer normally - install things, change settings, experiment - and decide afterward what's worth keeping.

What if that environment could follow you from machine to machine, adapting to the hardware underneath it?

That's the idea behind Wayfarer.

My Goldilocks problem

I've been interested in reproducible Linux for a while and have tried various approaches. There's something I love about almost all of them, but there's always something that keeps me from sticking with them.

NixOS is nearly perfect, or rather, the result you get is nearly perfect. But I don't enjoy writing Nix. Everything feels so rigid and all-or-nothing to me, and there's so much upfront work. Then there's the weirdness of the Nix store, the non-FHS filesystem layout, and the feeling that a lot of my existing Linux knowledge doesn't carry over. But I don't want to pick on NixOS too much because, in my opinion, nobody does reproducibility better. I just don't think it's for me.

LLMs have made NixOS much more accessible and you can pretty much get an entire system set up without having to touch the Nix language. But then you have almost zero understanding of how your system is set up. You still have to read Nix and unravel a rat's nest of modules to see how something is set up.

Universal Blue is one of my favorite reproducible Linux projects out there, but I want something uniquely mine. I started out with their custom builder that lets you define your hosts using YAML, which has since been spun off into Blue Build. That's more my speed and you get a normal Linux system out of it that feels familiar. Still, I was having to declare my intentions ahead of time.

My personal configurations were another matter. NixOS covers operating system config + user settings better than any other project out there. Elsewhere, you mostly have to resort to tools like GNU Stow, Chezmoi, etc. The problem with stow was it stores exact configurations and that's not always what I want. I need different scaling and font sizes depending on the machine I'm using. Chezmoi can accommodate that, but now I'm writing templates.

These are all great tools. It's a me problem.

When I'm in the middle of something and realize I need a tool or I change a configuration, the last thing I want to do is follow a change management process on my own laptop. I want to get what I need and get back to what I was doing.

I'll update my configuration later. Except I don't. Despite having all this wonderful machinery in place to keep my computers consistent, they inevitably drift apart. Eventually, I dedicate some time to cleaning things up and I'm going through everything, tearing things up, and trying to make it pristine again like it's an episode of Hoarders being acted out inside my computer.

That led me to realize that my problem wasn't with the declarative configuration itself. It was that I was expected to declare my intent before acting.

I want to do things and then reproduce them.

Reversing the order of operations

My first attempt at addressing this was a small project called Sameish .

Sameish compares Linux machines, identifies differences in installed packages, configuration files and enabled services, and lets you reconcile them after the fact. It's not about reproducibility. It's for users who are willing to accept their machines being the same-ish. It even works across distributions.

I jokingly described it as configuration management for the laziest Linux users imaginable. Configure first. Reconcile later. I even came up with a serious sounding name for this workflow: Retrospective Configuration Management.

Sameish worked and actually found discrepancies between my machines that I didn't realize existed. But it also got me thinking about how far the idea could go.

Could retrospective configuration management be a foundational property of an operating system rather than a tool that runs on top of one?

Could I still have the freedom of a normal mutable Linux desktop while enjoying the benefits of declarative, image-based deployments?

Instead of declaring my intent in a configuration language before acting, could the operating system discover my intent retrospectively through my actions and then translate it into something reproducible?

That's where Wayfarer came from.

Configure by using. Reproduce everywhere.

Wayfarer is built on Fedora, KDE and bootc. It isn't an attempt to invent a new distribution. It's an experiment in how computing environments might be managed and reproduced.

The basic flow looks something like this:

  1. Use your computer normally. Install packages with dnf, flatpak, etc. Change settings, enable services, install development tools, whatever.
  2. Wayfarer discovers what you've changed.
  3. Adopt the changes you want to keep.
  4. Those changes become declarations in a shared environment called a Nexus.
  5. CI builds new operating system images from those declarations.
  6. Your machines receive the new releases and apply the relevant user configurations.

The declarative model still exists. You just don't have to do it yourself.

And rather than distributing the accumulated state of one machine to another, Wayfarer captures selected changes as intent. Package dependencies are resolved during the build. Kernel modules are compiled for the appropriate kernel. User configuration is applied selectively.

You're reproducing an environment rather than cloning a computer.

Watch an ordinary Fedora desktop become a reproducible computing environment. Applications, development tools and desktop preferences are configured using familiar tools, then adopted into the Nexus. A freshly installed computer joins and inherits that environment, with subsequent changes flowing in both directions. No configuration files to write, no dedicated server and no cloud service.

This eight-minute demonstration was recorded unattended in virtual machines, with captions explaining each step.

Manage environments, not machines

The more I explored this idea, the less interested I became in managing individual computers.

My laptop and desktop have different hardware, but they're really just different places where I access the same computing environment. Or at least that's how I like things to be.

If I install an NVIDIA driver on my desktop, I don't want that driver on my laptop, which doesn't have NVIDIA hardware. If I changed my preferred terminal font, I probably don't want that change everywhere because I have a huge 4k monitor for my desktop and a measly 13 inch screen on my laptop. And that brings me to font scaling and resolution. I definitely don't want those settings everywhere. Those are specific to a particular machine.

Wayfarer distinguishes between changes intended for the entire environment, changes specific to a hardware profile and changes specific to a particular host.

In the prototype, installing NVIDIA drivers using ordinary Fedora workflows - dnf via RPM Fusion repo - results in Wayfarer creating a hardware-specific declaration. CI builds an appropriate image variant and machines select their variant automatically based on their hardware.

Remove the hardware and the machine returns to the base variant.

Nobody has to maintain a separate NVIDIA configuration or change any configuration by hand.

Ultimately, I'd like the physical computer to become a largely interchangeable component of my computing environment. I don't care which machine I'm sitting in front of. I just want it to feel like mine.

Experiments shouldn't be a problem

One of the things I wanted to keep was the ability to mess around with my own computer. Not every change I make represents an enduring intention. Sometimes I just want to try something.

Maybe I'm evaluating a package. Maybe I'm troubleshooting a hardware issue. Maybe I'm just tinkering for the fun of it.

Wayfarer treats unadopted changes as local experiments. I can keep them, adopt them or discard them.

One of the more interesting problems was figuring out what happens when a new release arrives while an experiment is still open. I don't want experiments to prevent a machine from getting updates, but I don't want an update to wipe out my experiment either.

The prototype can rebuild an open experiment on top of an incoming release. The user gets the new release while retaining their unadopted changes.

The other interesting experiment

There's something else about Wayfarer that I think is as interesting as Wayfarer itself.

The vast majority of the implementation was done by AI.

I'm a former software engineer with rusty coding skills. I understand software architecture, operating systems, infrastructure and a good amount of the engineering involved in a project like this.

But there's a substantial gap between the things I can conceptualize, the engineering problems I can reason through, and what I could realistically implement myself.

Even where I possess all the knowledge, there's the time involved. There's the patience required to work through thousands of little implementation details - I have none, by the way. There's the opportunity cost of spending weeks or months exploring an idea that might not even work.

Under normal circumstances, Wayfarer probably wouldn't have been anything more than an idea I kicked around in my own head for a few days before deciding it's too big to explore on my own.

Instead, I was able to concentrate on the architecture, requirements, design decisions, constraints, failure modes and validation while delegating most of the implementation to AI.

A few days after wondering whether this was even possible, I had a functioning prototype with automated VM testing.

That blows my mind and has given me new energy to create things that previously would have been out of reach.

AI changes what I'm willing to imagine

A lot of the conversations around AI-assisted software development revolve around productivity. How much faster can we write code? How much work can an individual accomplish? How many fewer developers does a company need when developers can be 10x productive?

I think there's another dimension to this that's much more interesting.

AI changes the kinds of ideas I'm willing to entertain in the first place.

There's a mental calculation that happens whenever you have an interesting idea. How difficult will this be? How long will it take? Do I even have the skills required? How long will it take to learn the skills? Do I even want to do that? Is this worth the effort?

Historically, that calculation has killed a lot of my ideas before I've seriously explored them.

Now I can spend an afternoon exploring an architecture that I might previously have dismissed as infeasible to take on myself.

And the more ambitious ideas don't necessarily require me to give up engineering judgment. I still have to understand what I'm trying to accomplish. I still have to reason about the architecture, recognize bad decisions, establish constraints and determine whether the result actually works. I've simply delegated the most time-consuming and least interesting parts for me.

Delegating implementation isn't the same as delegating responsibility for the engineering.

The Wayfarer acceptance tests are probably the best illustration of this. They deliberately test failure conditions: broken releases, kernel errors, interrupted builds, stale deployments, hardware changes, updates arriving at the wrong time, etc.

The tests have exposed plenty of problems. Finding and addressing those problems is the engineering process, regardless of who's typing the code.

One particularly nasty bug involved Podman's build cache reusing an earlier checkpoint layer and silently dropping newer package changes. Another involved a staged checkpoint becoming stale because the user continued making changes before rebooting.

These are the sorts of things the system has to get right. I don't particularly care who writes the code to address them, but I care a great deal about understanding the failure modes and establishing that they've actually been addressed.

I don't know what exactly software engineering looks like a few years from now, but I find this way of working hugely empowering. It's not just enabling me to do more of what I was already doing. It's enabling me to do things I otherwise wouldn't have attempted in the first place.

Where things stand

Wayfarer is a research prototype. It's definitely not something I would recommend installing on a computer that's important.

The core mechanisms have been demonstrated in VMs, including:

Real hardware testing, release authentication, conflict handling and plenty more production hardening remains.

I published the demo, architectural docs, acceptance test results and a roadmap on GitHub. Source code will eventually follow.

Scratching my own itch

I'm not trying to convince anyone to abandon NixOS, Universal Blue, BlueBuild or their dotfiles repository - certainly not for an experiment when all those other projects have years of proven use.

If those tools work for you, that's great. I wish I was the kind of person who enjoyed maintaining a beautifully organized NixOS config, but I don't.

I wanted the benefits of reproducible computing without having to become a more disciplined person and I was curious whether that was possible.

What are your thoughts? Do you prefer a declarative system you describe ahead of time or one where you act first and then choose what becomes the declaration?

Wayfarer: github.com/jeffmarder/wayfarer
Sameish: github.com/jeffmarder/sameish