-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bud): implement a 'cfg' command for managing profiles / users / hosts / modules #357
base: main
Are you sure you want to change the base?
Conversation
Anyone get a chance to test this? I'll try to take a look at it over the weekend if not. |
This is not in any significant way related, but I'm starting to favor the folder layout that is exemplified in |
Speaking of folder layout, here is mine based on digga's example
This makes it easier to manage in flake as |
It should be easy to support that layout; aside from |
This is a neat idea to share profiles. I think we can brainstorm ways to let this concept work without requiring a strict folder layout, since many of us use non-standard repo formats. And if we do that it might make sense to merge this into upstream bud instead - assuming the only objection is that it requires a strict devos format. I'm thinking We've had the discussion on sharing profiles before, we decided against a flake output because we weren't sure how share-able they are. I like this approach since we treat them as files/templates and let the user adapt them once their copied. Also modules should be shared using |
We can let the user specify any path they want seperated by dots, which would support all structures for copying at least. For seeing what modules / profiles etc. are available we can search for directories and let users define where their modules / profiles / hosts etc. are. (in a top level nix file?) |
Correct. If we can generalize, that would be fantastic!! @yusdacra I did not understand your reply. Sry 🤷 |
Wouldn't the obvious solution to this be to simply export the profiles via an attribute set at |
That would work, but we'd need to process the |
I prefer something along the lines of this PR better. I'm against exporting profiles because they are not built to be shared. Sometimes they depend on other profiles or they use things which are devos specific, and I feel like flake outputs should be fairly generic. This makes more sense since we're just copying the profiles over and that both allows and encourages the user to edit the profile for their needs and situation. |
Seems hard to justify being against one but not the other since they are kinda the same 😕 I was just trying to find a solution to the problem of having a rigid structure and flake outputs seem like the right solution. You can still copy the files from the outputs if you desire to modify them. Profiles are usually generic enough to be shared. Anything super idiosyncratic should probably be in your user profile or your host files. In any case, we export profiles at work in bitte and it works out rather nicely. |
I'd like to add, that in If we implement well chosen cli wrappers (in bud) around devos or digga, I'd favor such approach. It should be This is somewhat decoupled from the decision on what to export. Maybe we can recompile a set of use cases & measure them by the initial & current goals of the sharing model, taking first principles into account? @yusdacra sorry that your work is getting cought in such fundamentals. 😄 |
It's alright, no rush here :D I like the idea of having a JSON output that I would be willing to rewrite this in Rust (I would like to keep it in bash as to keep it simple, but if JSON will come into play I much rather prefer Offtopic note: something like the new flakes listing on search.nixos.org but for devos / digga repos would go hand in hand with this PR as users could easily find profiles / modules from |
despite #477, i think this would be a great enhancement, perhaps as a regular old devshell script |
This add a
cfg
command tobud
with following subcommands:cfg add
: Fetch and add profiles / users / hosts / modules from other users' DevOS repositoriescfg remove
: Delete a profile / user / host / module from your configurationcfg show
: Show the profiles / users / hosts / modules of a users' DevOS repository (or yours)