Open roberth opened 1 year ago
I was looking for something exactly like this but didn't know what to search for!
Not exactly as easy to use as fleek, but I use flake-parts to manage my home-manager among other things while still writing Nix: https://github.com/srid/nixos-flake => https://github.com/juspay/nix-dev-home - maybe you can borrow some ideas from there. I'd like to add support for Emacs, Neovim, etc. configured for dev envs: https://github.com/juspay/nix-dev-home/issues
This is great context @srid thank you!
@srid @roberth would you be interested in collaborating on this?
@bketelsen I'm occupied with various projects right now, but I'd be happy to help re: questions / discussions / explanations and generally take part in design discussions.
@srid @roberth I have a PR in now that does the integration with flake-parts (and nixos-flake). If either of you have time to take a look, I'd really appreciate it. I forked nixos-flake to add the hostname to the homeConfiguration's name because fleek supports multiple usernames and multiple hosts.
see #156
a real-world generated flake with this PR is here: https://github.com/bketelsen/fleek
Hi!
This is a really cool project. I came across it on lobste.rs just now and realized that flake-parts would be a good fit for what you're doing, especially if you want to venture beyond nix and home-manager, and help out with custom packages, devshells, etc.
Is your feature request related to a problem? Please describe.
At some point, users will want to do something advanced and run
fleek eject
(which I think is a really neat idea).What if instead, they could import their advanced thing into their fleek config, and keep using fleek?
Wouldn't it be nice to capture some more advanced patterns in Nix logic, and be able to share that with others?
Or perhaps reuse solutions to common problems that others have already solved?
Describe the solution you'd like
flake.parts provides the logic that lets you integrate these things. It takes pride in being an unopionated core, well, with two opinions:
system
, and standardizing the way to put that together is helpfulBecause it's an unopinionated, thin wrapper around the schema of the Nix CLI, you can keep generating largely the same code you already are. You could put whatever flake outputs you generate right into the
flake
option.A tighter integration - making use of the
perSystem
option - would be possible, but even without that,perSystem
already works as expected for users if they writeself'.packages
instead ofconfig.packages
. Do you even generate packages? I might be overthinking.Anyway,
fleek eject
could keep working the way it does, generating either a plain flake or a flake-parts based one, depending on user choice, or perhaps what's necessary if you decide to let some functionality rely on some flake-parts module.Describe alternatives you've considered
Can't really think of any, but I can't claim to know the whole ecosystem either, and I'm really lazy when it comes to my home. It works :)
Additional context Add any other context or screenshots about the feature request here.