Brainstorm for RFC: Assimilate home-manager into Nixpkgs monorepo

Hi,

Sorry for the delay in responding. I have nothing against this if you (or somebody else) is willing to work on the integration. I can certainly help out with getting the preparatory changes into the Home Manager repository, for example, by switching over to the RFC code format style. Unfortunately I can’t help much with the actual integration into Nixpkgs since I haven’t kept up very well with recent changes in Nixpkgs. One concern would be to maintain support for all three deployment methods, standalone, NixOS, and nix-darwin (btw. will nix-darwin also be merged into Nixpkgs?).

My personal concern is that Nixpkgs is very large and cumbersome to work with, e.g., making it impossible to use conveniences such as Magit Forge. This is a pretty insignificant complaint, though, I’m guessing most others have a more reasonable workflow that are not so sensitive to the GitHub project size :slightly_smiling_face:

On a more bureaucratic note, Home Manager has some rudimentary i18n support and the translation is managed in a Weblate project. Should this project also be moved over to an overall NixOS project?

Similarly, some time ago I registered the domain home-manager.dev, and host a basic site at https://home-manager.dev/. Should this domain be moved to the NixOS Foundation? Perhaps discontinued entirely?

16 Likes

Given the recent intervention of Rycee, I think I will defend a hybrid approach.

No problem.

Well, I think we can work around this.
The idea is to employ a hybrid approach, in which we migrate things bit by bit, instead of grafting the whole pristine Home-Manager tree.

Given that you are the current maintainer, you can help a lot as a consultant about the code.

Indeed the large size of Nixpkgs imposes huge challenges for any porcelain:

Maybe we can talk with the developers of Emacs Magit about this?

Yes, most certainly! This can and should be expanded to the whole Nixpkgs repo too.

What about aliasing it to, say, https://home-manager.nixos.org/?

5 Likes

Sure, I’ll help out in any way I can within my time constraints.

No worries, this is not a blocker and I’ll adjust my flow as needed.

That said, the bigger picture about Nixpkgs size is that it is downloaded an enormous number of times per day and I suspect the intent behind most downloads is simply to access a few packages. With Home Manager included it would make these downloads larger without adding any benefit. To get an idea of the size of HM: Downloading the repository as a ZIP file produces a file about 1.5MiB in size. This is small compared to Nixpkgs’ 65MiB but not nothing…

That sounds good. Overall the i18n situation is pretty bad in the overall Nix ecosystem so I think and movement here would be good.

That is fine for me.

6 Likes

Not to necropost, but there’s an important development - Hjem is perfectly situated to fill this. It doesn’t provide any modules (that goes to Hjem-Rum) - just the ability to manage home files. There are technical issues with the current linker (that are actively being addressed) - but when those are resolved, I think this would be a really great opportunity for upstreaming.

13 Likes

That’s mine and @NotAShelf’s project, btw :stuck_out_tongue_winking_eye: Though we do want to make a couple changes before formally announcing it.

13 Likes

I’d also like to add that maybe-possibly upstreaming Hjem is a possibility, and has been discussed (inconclusively) prior [1], but as @waffle8946 stated Hjem has a few things we would like to work on before even making a public statement about its usage; for those interested, we intend to:

before we mark Hjem as production-ready (even though several users have been using it with great success so far.) I also would like to improve our testing “architecture”, but this is after the actual checklist itself.


  1. On a semi-serious note, the reason I’ve decided to initiate Hjem was the possibility of Home-Manager making it into Nixpkgs as is. Quite sure I’ve (half-jokingly) said once that I would rip it out in a nixpkgs fork and use that if that were to ever happen. ↩︎

23 Likes

As home-manager was my entry drug into Nix (many years ago using macOS on Intel), I personally dislike it with a passion now. I’m currently using NixOS purely with flakes on a lot of machines. I am managing my and other user environments purely with Nix and I am happy with that. I do not need a dotfile replacement, although a user-systemd-service thing would be nice. Integrating home-manager should be at least an opt-in thing and completly optional.

1 Like