nixpkgs/nixos
Eelco Dolstra 5f077e2296 Factor out option renaming
Option aliases/deprecations can now be declared in any NixOS module,
not just in nixos/modules/rename.nix. This is more modular (since it
allows for example grub-related aliases to be declared in the grub
module), and allows aliases outside of NixOS (e.g. in NixOps modules).

The syntax is a bit funky. Ideally we'd have something like:

  options = {
    foo.bar.newOption = mkOption { ... };
    foo.bar.oldOption = mkAliasOption [ "foo" "bar" "newOption" ];
  };

but that's not possible because options cannot define values in
*other* options - you need to have a "config" for that. So instead we
have functions that return a *module*: mkRemovedOptionModule,
mkRenamedOptionModule and mkAliasOptionModule. These can be used via
"imports", e.g.

  imports = [
    (mkAliasOptionModule [ "foo" "bar" "oldOption" ] [ "foo" "bar" "newOption" ]);
  ];

As an added bonus, deprecation warnings now show the file name of the
offending module.

Fixes #10385.
2015-10-14 18:18:47 +02:00
..
doc/manual nixos/manual: installation iso logs in automatically 2015-10-11 13:37:19 +02:00
lib Give more memory for the disk image builder 2015-10-06 15:03:26 +02:00
maintainers Hack to parallelize AMI copying 2015-09-29 14:54:12 +02:00
modules Factor out option renaming 2015-10-14 18:18:47 +02:00
tests gnome3 test: increase timeout 2015-10-05 22:10:40 -06:00
COPYING Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
default.nix Fix nixos-option 2013-10-28 22:45:58 +01:00
README Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
release-combined.nix Don't block releases on nixos.tests.gnome3.i686-linux 2015-10-14 13:55:43 +02:00
release-small.nix release-small.nix: Drop the grub1 test 2015-08-11 13:51:55 +02:00
release.nix Disable the ec2-config test 2015-09-28 13:47:14 +02:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.