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 without
default.nix in them
- Directories with
default.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?
I want Haumea to automatically convert
directoryToImportimports todirectoryToImport.defaultimports IF the directory contains adefault.nix.Reason is as follows:
Let's say I have two types of directories:
default.nixin themdefault.nixin 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.defaultto 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?