fa73c70b

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Add 'bevel migrate' and run it at home-manager activation

The bevel database schema was only ever created as a side effect of running
some 'bevel' subcommand, so on a machine that had never had one run,
bevel-gather could not record anything and 'bevel sync' had nothing to sync.

'bevel migrate' takes the exclusive database lock and applies the migrations,
without doing anything else. The home-manager module runs it both from an
activation script and from a 'bevel-migrate' user service that 'bevel-sync' is
ordered after. The activation script is what actually closes the hole: the
user's systemd instance is not running while home-manager activates on a
machine nobody has logged into yet ('User systemd daemon not running.
Skipping reload.'), so the service alone does not run at that point.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 0s 12s 12s 13s 0s
Build 12s 0s 0s 12s 0s
Suite 0s 13s 13s 13s 0s

Timeline

0s10s