[Nix-dev] NixOS: New scheme
Nicolas Pierron
nicolas.b.pierron at gmail.com
Mon Nov 17 20:28:18 CET 2008
On Sun, Nov 16, 2008 at 23:19, Marc Weber <marco-oweber at gmx.de> wrote:
>> At the end of the file, attributes are set like if this was your own
>> computer configuration file.
>>
>> 2.2/ Options
>>
>> Options can have the following list of attribute:
>>
>> - default: Default value
>> - example: Give an hint on the syntax accepted for this option.
>> - description: Give context information about the option and its role
>> in the configuration of the computer.
>> - merge: Function which have two arguments (the name of the attribute,
> name? Is this a full qualified one ? eg
> services.network.apache.subversion.url or only "url" here ?
The full qualified name.
> Why do you pass it at all? Do be able to create nice error messages such
> as "Wrong config option in <name>"?
exactly and also for the generated documentation.
> Maybe it's better to add a catch directive to the language then or
> return some special attr set such as
> { error = "foo"; } so that the library can create that error message
> than?
catch method are use if you want to separate error handlers. In my
opinion, I would prefer to have something which retrieves the original
location of an attribute definition instead of a name.
So error handlers would be like:
abort "${name}: ${builtins.locationOf value}: message."
The problem is the following question: What is the location of the
result of a partially called function ?
>> ------
>> require = [
>> (import configurations/hardware/network/Intel4965AGN.nix)
>> ];
>> ------
>
> That honors the idea put on list some time ago about only saying
>> (import configurations/discounterPC.nix)
> which can import the Intel4965AGN itself to setup the pc configuration
> atutomatically, correct?
That's correct. So many person can share the same basic computer
configuration. So if any one else on this mailing list is using a
Compaq Presario 2144EA, the pcmcia problem is already solved for him
(Unfortunately I guess that I am the only user among this mailing
list)
--
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