nixpkgs/lib
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
..
tests NixOS modules: Add error context on module arguments evaluation. 2015-07-14 15:07:54 +02:00
attrsets.nix Add lib.filterAttrsRecursive function 2015-09-19 00:33:44 +02:00
composable-derivation.nix
customisation.nix lib: add makeScope 2015-09-27 09:45:23 -05:00
debug.nix lib: cleanup a little bit, add traceIf 2015-03-26 12:43:42 +00:00
default.nix Rename misc.nix -> deprecated.nix 2015-07-23 18:31:54 +02:00
deprecated.nix Remove deepOverride 2015-07-28 21:42:25 +02:00
licenses.nix lib.licenses: add fdl13 2015-09-27 09:45:35 -05:00
lists.nix Use builtins.sort 2015-07-28 18:42:22 +02:00
maintainers.nix git-crypt: update maintainer 2015-10-14 21:46:27 +08:00
meta.nix
modules.nix Factor out option renaming 2015-10-14 18:18:47 +02:00
options.nix Add read-only options 2015-07-30 13:44:50 +02:00
platforms.nix Improve the list of archs made by commit 1299c020e9 2015-04-17 15:25:54 +02:00
sources.nix
strings-with-deps.nix
strings.nix Allow options with type "package" to be store paths 2015-08-07 03:09:57 +02:00
systems.nix
tests.nix
trivial.nix Rename misc.nix -> deprecated.nix 2015-07-23 18:31:54 +02:00
types.nix nixos,lib: move environment generation related copy-paste to lib 2015-09-18 18:48:49 +00:00