* gnu/home-services/state.scm (state-hg): New procedure.
* gnu/home-services/version-control.scm: Export ‘serialize-hg-config’.
The state services probably need a refactor, I think you mentioned that
specific state services should be put into other modules, e.g. (gnu
home-services version-control) for ‘state-git’ and ‘state-hg’.
Yes, it requires a refactoring, I would like to make those state-*
functions return a state record, which has a few different fields and
the home-state-service will create shepherd services from those records.
It will allow to pass these state records to other services or any other
places, where the values of fields are needed. Also, it will make it
easier to swap underlying state initialization and/or syncronization
mechanism in case in the future we decide it's necessary to do it
outside of shepherd or something else.
After refactoring we can move non-generic states to respective modules,
I still find this to be a good idea.
Applied the patch.