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

Importers #8

Closed
blaggacao opened this issue Apr 6, 2021 · 3 comments
Closed

Importers #8

blaggacao opened this issue Apr 6, 2021 · 3 comments

Comments

@blaggacao
Copy link
Collaborator

blaggacao commented Apr 6, 2021

modulesFromList = paths:
genAttrs'
(path: {
name = removeSuffix ".nix" (baseNameOf path);
value = import path;
})
paths;

This is effectively an implementation of an importer and it is of undisputed handy nature.
Are other (generic!) importers potentially in scope?

/cc @Pacman99

@blaggacao blaggacao mentioned this issue Apr 7, 2021
@blaggacao
Copy link
Collaborator Author

Importers work best with an elaborate implementation within the nix module system for doc, type checking, preprocessing, etc. To maintain this repo nixpkgs-dep free, we figured it would be best to leave that to the devos sister project, which does not have this restriction (on nixpkgs-freeness).

@gytis-ivaskevicius
Copy link
Owner

At some point ill look over the importers devos has, might be cool to add some. Till this day I am not exactly sure about all the terms and use-cases so it's going to take me a little bit to figure out if it makes sense to have it as part of fup or not.

Also, this implementation seems to cover most cases https://github.com/gytis-ivaskevicius/nixfiles/blob/master/flake.nix#L47 (According to DevOS terms one would call it "Profiles"? )

@blaggacao
Copy link
Collaborator Author

blaggacao commented Apr 26, 2021

The (one) fundamental concept of devos is to make a clear distinction between modules that implement specifications and profiles that apply them.

Defining only a module would never alter the system state by itself, without also applying it in a profile.

That enhances the sharing model where modules remain sharable independently of their activation.

Suites are a way to group profiles into broader useful categories that, complememted with hardware specific stuff, make a host config.

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