Turn it into a flake

Course map
Checkpoint 02Turn it into a flake
Hands-on checkpoint

Move your system into a flake

The machine you installed last time is still here, still called snowflake. Its description lives in /etc/nixos, where root owns it and nothing pins the version of nixpkgs it was built from. We'll move it into a folder of your own, and archive the originals only after the flake has really built the system.

Everything here is simulated, and separate from checkpoint 01.
GNU GRUB  version 2.12

Every generation you have built is still here.
Use the ↑ and ↓ keys to choose one, then press enter to boot it.

Checkpoint complete

Your machine is a flake

snowflake is built from ~/nixos-config, with the old files safe in /etc/nixos/archive. The version of nixpkgs it used is written down in flake.lock, so the same folder can reproduce the same system on a compatible machine.

Turned on nix-command and flakesDescribed the machine in a flake you ownArchived the old files, after proving it worked
Watch my castle grow Find my next road
joyerbox