NixOS modules: Difference between revisions

imported>Tilpner
Describe how to use imports without committing to a directory structure
imported>Makefu
add subsection "Advanced Use Cases" aka. things you shouldn't have to bother when you start with NixOS
Line 114: Line 114:
</syntaxhighlight>
</syntaxhighlight>


== Compatibility Issues with Different Nixpkgs Versions ==
== Advanced Use Cases ==
=== Compatibility Issues with Different Nixpkgs Versions ===


Module options between Nixpkgs revisions can sometimes change in incompatible ways.
Module options between Nixpkgs revisions can sometimes change in incompatible ways.
Line 129: Line 130:
</syntaxhighlight>
</syntaxhighlight>


== Abstract imports ==
=== Abstract imports ===


To import a module that's stored ''somewhere'' (but for which you have neither an absolute nor a relative path), you can use [https://github.com/musnix/musnix#basic-usage NIX_PATH elements] or <code>specialArgs</code> from <code>nixos/lib/eval-config.nix</code>.
To import a module that's stored ''somewhere'' (but for which you have neither an absolute nor a relative path), you can use [https://github.com/musnix/musnix#basic-usage NIX_PATH elements] or <code>specialArgs</code> from <code>nixos/lib/eval-config.nix</code>.