You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want Haumea to automatically convert directoryToImport imports to directoryToImport.default imports IF the directory contains a default.nix.
Reason is as follows:
Let's say I have two types of directories:
Directories withoutdefault.nix in them
Directories withdefault.nix in them.
In the first scenario, it's a case where I want all files in the dir without question (which is why I started using Haumea in the first place). But the second scenario is more for when I want a more portable directory structure and/or want to be more precise in what modules I want to import in the dir (example in this case being NixOS configuration). This second scenario becomes a bit clunky to solve. I have to write directoryToImport.default to actually import the directory, which is unneccessary, ugly and removes the dynamic ability in going back and forth between importing a loose nix file and a directory without changing its file path.
How do I do this?
The text was updated successfully, but these errors were encountered:
If you want 2), you can implement it yourself using your own transformer, but possibly it might be a bit tricky to determine which of the attributes are sub-directories vs nix files.
I want Haumea to automatically convert
directoryToImport
imports todirectoryToImport.default
imports IF the directory contains adefault.nix
.Reason is as follows:
Let's say I have two types of directories:
default.nix
in themdefault.nix
in them.In the first scenario, it's a case where I want all files in the dir without question (which is why I started using Haumea in the first place). But the second scenario is more for when I want a more portable directory structure and/or want to be more precise in what modules I want to import in the dir (example in this case being NixOS configuration). This second scenario becomes a bit clunky to solve. I have to write
directoryToImport.default
to actually import the directory, which is unneccessary, ugly and removes the dynamic ability in going back and forth between importing a loose nix file and a directory without changing its file path.How do I do this?
The text was updated successfully, but these errors were encountered: