migrate to ix

Migrate to ix

ix boots machines from a repo: a flake that evaluates to a NixOS system, or a default.ix. Migrating is getting the machine you have into that form. Depending on where you start, most of the work is already done.

From NixOS

A NixOS config repo already boots on ix:

$ix new github:you/nixos-config

#name picks the configuration, so a personal config can carry a server-shaped nixosConfigurations.ix next to the laptop one. Templates has the details.

From containers

A Dockerfile or compose file already describes the machine: base system, packages, ports, a start command. Translating it into a default.ix is mechanical, so let a coding agent do it: give it the file, ask for a default.ix that runs the same thing, then ix apply, read ix logs, fix, apply again.

From a hand-built server

The same translation, except the description has to be read off the server first. Give an agent a shell on the old machine and have it write the default.ix for what it finds: installed packages, running services, listening ports.