3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/lib
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
..
test-driver Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
build-vms.nix Terrible backward compatibility hack 2013-10-11 13:36:09 +02:00
channel-expr.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
eval-config.nix Big cleanup of the NixOS module system 2013-10-28 22:45:55 +01:00
from-env.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-iso9660-image.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-iso9660-image.sh Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-squashfs.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-system-tarball.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-system-tarball.sh Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
nixpkgs.nix Terrible backward compatibility hack 2013-10-11 13:36:09 +02:00
qemu-flags.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
testing.nix Fix runInMachine 2013-10-16 11:37:38 +02:00
utils.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00