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

pathsToImportedAttrs does not accept directories #221

Closed
GTrunSec opened this issue Mar 27, 2021 · 4 comments · Fixed by #224
Closed

pathsToImportedAttrs does not accept directories #221

GTrunSec opened this issue Mar 27, 2021 · 4 comments · Fixed by #224
Labels
bug Something isn't working

Comments

@GTrunSec
Copy link
Contributor

GTrunSec commented Mar 27, 2021

Does anyone import the modules more than one in module-list.nix. But for me, only one module can be loaded in configuration which in the first line.

this issue appeared in https://github.com/GTrunSec/nixos-flk/tree/core/modules '

migrated from https://github.com/GTrunSec/nixos-flk/tree/master/modules (old version of nixflk)

@GTrunSec GTrunSec added the bug Something isn't working label Mar 27, 2021
@GTrunSec
Copy link
Contributor Author

@Pacman99
Copy link
Member

I think that might be because devos requires each module to be a specific file. And not a default.nix in a directory. Thats how its able to export modules under nixosModules, it gets the name from the file by stripping the '.nix'. But this could definitely be improved, so thanks for opening this.

@nrdxp
Copy link
Collaborator

nrdxp commented Mar 27, 2021

I think, if it is a directory, we can use baseNameOf (dirOf path) to get it for dir/default.nix, and the current logic should already accomplish this for dir.

@Pacman99
Copy link
Member

Yeah, should we also cover the case of importing a folder's default.nix?

@nrdxp nrdxp changed the title The modues/module-List does not recursiveUpdate module-list does not accept directories Mar 29, 2021
@nrdxp nrdxp changed the title module-list does not accept directories pathsToImportedAttrs does not accept directories Mar 29, 2021
@bors bors bot closed this as completed in f14dcda Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants