Hi guix!

There is an implementation of `guix home` subcommand, which behaves
similar to `guix system`, allowing declaratively manage applications and
their configurations, but for a particular user, not the whole OS:

* Overview
It possible to define the desired environment with home-environment
record, which contains a list of home-services and few other
configuration options and build and install it with `guix home
reconfigure`. The service extension mechanism works the same way as in
operating-system and utilize fold-services from (gnu services).

Current set of implemented essential services:
- home-service :: return the derivation
- home-profile :: manages a separate profile with packages provided by
user or other services
- home-environment-vars :: allows to set env vars for user's shell
- home-shepherd :: manages user's shepherd, can be extended by other services
- home-run-on-first-login :: launches shepherd and some other one-time actions
- home-run-on-reconfigure :: update shepherd configuration and update
symlinks from ~/ and ~/.config to guix-home-environment/files
- home-symlink-manager :: extends on-reconfigure with a update-symlinks script

For now I personally manage just a few applications on my system and it
seems that everything works as expected, but I plan to migrate all the
"dotfiles" to it in nearest future. AFAIK, some people succesfully use
it on other GNU/Linux distributions.

* Alternative solutions
In contrast to guix-home-manager, `guix home` doesn't introduce any too
innovative approaches (those ideas are cool, but in some use cases are
too radical), `guix home` uses the same extension mechanism [fn:1] as
guix system services and doesn't require to make HOME read-only. Thus,
it's possible to start using `guix home` gradually, along with other
tools and workflows (stow, guix package, chezmoi, yadm, etc).

Talking about Nix's home-manager: it's a nice software, but maintained
separately from nix package manager and kinda disconnected from Nix
itself, which introduce a lot of duplications between NixOS modules and
home-manager modules, requires additional installation steps and overall
makes it harder to use for not very experienced nix users. Probably, we
can learn from it and do better here.

* Future steps
`guix home` still under active development, but already complete enough
for exloration and early adoption. There is no any documentation yet,
because things were changing often and probably will change one more
time during comming cleanup, however there were few video streams,
explaining internals of `guix home`:
mpv https://youtu.be/t3zRzQnarUI
mpv https://youtu.be/4lJaVzxO_Bs
mpv https://youtu.be/ZRQtCvo8MoM

In addition to documentation it will be necessary to implement a lot of
home-services for different tools, add rollback, shepherd-graph,
extension-graph and other actions, but before doing it I would like to
spend some time polishing essential services and decide on upstreaming
the tool to guix itself.

The question is: do we want and need at all `guix home` to be a part of
the guix? As for me, the tool seems like a natural addition to guix's
declarative configuration management approach and covers the missing
piece of user space software management and as I mentioned early
upstreaming will allow to make it better integrated with the rest of the
guix and easier to use for newcommers and casual users, but my
perception is obviously biased.

Dear maintainers and users, what do you think about making `guix home` a
part of guix?

* Footnotes

[fn:1] https://lists.sr.ht/~abcdw/rde-devel/%3C87sg56g97i.fsf%40trop.in%3E

Best regards,
Andrew Tropin

Reply via email to