ehllie / ez-configs

A flake-parts module for simple nixos, darwin and home-manager configurations using project directory structure
Mozilla Public License 2.0
59 stars 13 forks source link

feat: support passing additional module args to flake.*Modules #15

Open thecaralice opened 2 months ago

thecaralice commented 2 months ago

For example, this allows making a flake which provides some package and a NixOS module for configuring that package. Unlike globalArgs/specialArgs/extraSpecialArgs, these are passed to individual modules before exporting them, so these modules are usable from a different flake.

thecaralice commented 2 months ago

The naming is somewhat arbitrary, I wanted it to be distinct from what flake.*Configurations use, named them "early" because they are passed before the export through flake.*Modules unlike specialArgs and alike which are passed during module evaluation by the module system.

ehllie commented 2 months ago

I'm not sure I understand the use case for this here. Could you give an example of when you would need this?

thecaralice commented 2 months ago

I currently use my fork for this flake which both provides packages built from a remote source and a NixOS module using these packages, which is why I created this fork. Other potential usages include the flake providing a lib which is used by these modules or even using flake inputs from modules.