[Nix-dev] Re: Resolution context of `require' paths

Ludovic Courtès ludo at gnu.org
Tue Jun 30 11:55:11 CEST 2009


Eelco Dolstra <e.dolstra at tudelft.nl>
writes:

> - Pass the full set of modules to configuration.nix (and other modules of
> course) where they can be selected *by attribute name* rather than filename:
>
>   {config, pkgs, modules, ...}:
>
>   {
>      require = [modules.intel4965agn];
>   }
>
>   where "modules" is defined somewhere in the NixOS tree:
>
>   modules =
>     { intel4965agn = ./hardware/network/intel-4965agn.nix;
>       sshd = ./services/networking/sshd.nix;
>       ...
>     };
>
>   This allows a bit more abstraction than hardcoded filenames

I like this solution.

Thanks,
Ludo'.




More information about the nix-dev mailing list