Skip to content
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

Handle configuration imports #7

Open
vlinkz opened this issue Sep 28, 2022 · 1 comment
Open

Handle configuration imports #7

vlinkz opened this issue Sep 28, 2022 · 1 comment

Comments

@vlinkz
Copy link
Collaborator

vlinkz commented Sep 28, 2022

Currently only supports reading and editing a single file. Would be more useful if imports could be handled, read, and edited as well. Perhaps automatically detect a list, as well as support manually choosing files.

Related:
snowfallorg/nix-editor#7
#6

@ashkitten
Copy link

I was thinking about design for this as I try out SnowflakeOS. We might be able to avoid just slapping a filesystem tree in the user's face if we do this right. What do you think about a sort of "tags" UI where you can tag a value with what tags it applies to? Tags would correspond to modules, so would be hierarchical (import hierarchy, not filesystem). I made a very rough mockup of a possible UI:
image

In the image, the config root imports Desktop which imports Common, where the attribute is defined with mkDefault. However, it's overridden because the root also imports Server, so that section is desaturated.

We would have a separate UI as well, where the user would create Configurations and select Tags to include in each Configuration. These are sort of fuzzy details, and since each module is technically its own configuration it should probably be possible to convert between Configurations and Tags (i.e if someone wants to take an existing machine's config and generalize it into a tag or multiple tags).

As for the actual implementation, we could simply add a comment with special meaning to the file to represent its human-readable tag name.

Hope this makes sense and is helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants