hercules-ci / flake-parts

❄️ Simplify Nix Flakes with the module system
https://flake.parts
MIT License
721 stars 41 forks source link

Added `outPath` attribute to `self'` and `flakeModules` to `inputs'` #132

Closed LiGoldragon closed 1 year ago

LiGoldragon commented 1 year ago

Very straightforward. Was needed for clojix.

roberth commented 1 year ago

In general I'd recommend to only write reusable modules for the top level flake-parts configuration, which may then contain perSystem configuration, as displayed by most of the modules you can find in this repo.

Until we have type checking for module imports, I'm holding off on any changes that make perSystem more like the top level flake parts modules, to reinforce the distinction. This is not optimal, but slightly better than having confusing errors that are caused by wrong imports. Progress:

When this is done, I think we can let ourselves blur the lines a bit and replicate all of the top level stuff, which would be quite convenient indeed.

roberth commented 1 year ago

Both changes could perhaps be implemented more cleanly with an attribute such that self'.flake == self, as suggested in #152

LiGoldragon commented 1 year ago

Yes, good points. Thanks.