numtide / blueprint

Nix without the glue code
41 stars 3 forks source link

Consider adding support for standalone home-manager configurations #35

Open adam-gaia opened 3 weeks ago

adam-gaia commented 3 weeks ago

Is your feature request related to a problem? Please describe.

I have a home lab with multiple systems where one particular system does not run NixOS. I use home-manager to install user-level software on that device. Before using blueprint, I had a single flake that defined all the systems in my homelab and used home-manager.lib.homeManagerConfiguration {...} to create a standalone home-manager profile.

Describe the solution you'd like

I would like a blueprint flake to expose homeConfigurations.<name> in the flake outputs. These outputs would get picked up from a <repo>/homes* directory, in the same way hosts are picked up from the <repo>/hosts directory. e.g. <repo>/homes/agaia/home.nix would result in a flake output homeConfigurations.agaia for use with home-manager build --flake .#agaia

*Some bike shedding may need to happen. I don't know why, but calling the directory "homes" sounds a little awkward to me. "Home", singular, sounds better to me. At the end of the day, I don't really care what the directory is called though.

Describe alternatives you've considered

adam-gaia commented 3 weeks ago

I gave it a shot at implementing this myself. I got close, but don't love how it turned out. See my notes on the PR #36.

I know I did the work before discussing and having this request accepted. I won't be upset if it doesn't get merged, I'm still learning nix and this was a great hands-on learning experience :)