[Nix-dev] Re: [Nix-commits] SVN commit: nix - 15750 - NicolasPierron - in nixos/branches/modular-nixos: . hardware hardware/network hardware/network/smc-2632w hardware/network/smc-2632w/firmware hardware/network/smc-2632w/firmware/cis hardware/video hardware/v

Nicolas Pierron nicolas.b.pierron at gmail.com
Thu May 28 02:03:22 CEST 2009


On Thu, May 28, 2009 at 01:03, Eelco Dolstra <e.dolstra at tudelft.nl> wrote:
> Nicolas Pierron wrote:
>
>> Log:
>> Move hardware modules outside of the module directory because these are modules which should be imported only when you need to support some of them.
>
> This doesn't seem like a good idea (and I'd like to revert).  They are modules
> after all.  If the only reason is that you don't want them imported
> automatically, then don't have the generator script put them in module-list.nix
> (just filter out the whole modules/hardware directory).

I hate exceptions.  filtering hardware & computer & ... is a bad
thing.  I would prefer to leave the user import such file in its own
list of modules automatically generated with the same script.

> But more fundamentally, shouldn't these modules behave like all other modules?
> That is, that whether they're enabled or disabled is controlled by a config option?

No, because you will again end up with a catch all section, even if
this won't be directly put into one file, you will have a huge
repository and I think that the hardware configuration is a bit
orthogonal to NixOS which tries to handle the configuration &
services.  This explain why I haven't added it inside NixOS first but
inside the configuration repository which seems much more appropriate.

Another argument against that is that you will have to merge too many
configurations where most of them are just unused.  So this will cost
you time for nothing good.  Adding a require statement to the
corresponding hardware seems easy and does not waste your evaluation
time.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
- If you are doing something twice then you should try to do it once.



More information about the nix-dev mailing list