Commit Graph

362 Commits

Author SHA1 Message Date
Eelco Dolstra
4b1a9dd00b Remove uses of mkFixStrictness
mkFixStrictness is no longer needed, woohoo!
2013-10-28 22:45:55 +01:00
Eelco Dolstra
0e333688ce Big cleanup of the NixOS module system
The major changes are:

* The evaluation is now driven by the declared options.  In
  particular, this fixes the long-standing problem with lack of
  laziness of disabled option definitions.  Thus, a configuration like

    config = mkIf false {
      environment.systemPackages = throw "bla";
    };

  will now evaluate without throwing an error.  This also improves
  performance since we're not evaluating unused option definitions.

* The implementation of properties is greatly simplified.

* There is a new type constructor "submodule" that replaces
  "optionSet".  Unlike "optionSet", "submodule" gets its option
  declarations as an argument, making it more like "listOf" and other
  type constructors.  A typical use is:

    foo = mkOption {
      type = type.attrsOf (type.submodule (
        { config, ... }:
        { bar = mkOption { ... };
          xyzzy = mkOption { ... };
        }));
    };

  Existing uses of "optionSet" are automatically mapped to
  "submodule".

* Modules are now checked for unsupported attributes: you get an error
  if a module contains an attribute other than "config", "options" or
  "imports".

* The new implementation is faster and uses much less memory.
2013-10-28 22:45:55 +01:00
Vladimir Still
e329bb7877 maintainers: add vlstill. 2013-10-27 06:33:14 +02:00
Eelco Dolstra
a4f1f4b367 Small cleanup 2013-10-24 14:49:59 +02:00
Eelco Dolstra
d49f141a79 Manual: When building from the channel, link to the exact Git revision 2013-10-24 02:03:10 +02:00
Eelco Dolstra
6de7886fb8 Slightly improve option type error messages 2013-10-23 20:08:22 +02:00
Eelco Dolstra
ec0911ce7f Manual: Don't show obsolete/deprecated options 2013-10-23 20:08:21 +02:00
Eelco Dolstra
29014a47fb Allow options to be marked as "internal"
This means they're not for end users.  Currently they're filtered from
the manual, but we could include them in a separate section.
2013-10-23 20:08:21 +02:00
Michael Raskin
5bbb1f77b2 Adding SlimerJS — script-driven Gecko browser 2013-10-21 00:30:39 +04:00
Eelco Dolstra
ad0568e64a mkEnableOption: Add a period at the end of the description 2013-10-17 14:29:51 +02:00
Eelco Dolstra
04690da3bd Rename newOptionAttrSetToDocList -> optionAttrSetToDocList 2013-10-17 14:09:05 +02:00
Eelco Dolstra
5fef92c4a0 Move pkgs/lib/ to lib/ 2013-10-10 13:28:21 +02:00