
TL;DR
Using `specialArgs` in NixOS configurations can lead to unshareable modules and errors due to non-portability. A proposed solution involves curried modules to improve modularity and error handling.
✦ Why It Matters
Consider refactoring your NixOS modules to use curried functions for better portability and error handling.
Key Takeaways
How It Works
Curried modules allow for the separation of special arguments from standard module arguments, enabling cleaner and more manageable code. By applying special arguments before the evaluation of modules, this method ensures that all necessary inputs are available, preventing common errors associated with missing arguments.
This approach also allows for better organization of module code, making it easier to share and reuse across different configurations.
Related