nixpkgs/nixos/modules
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
..
config Factor out option renaming 2015-10-14 18:18:47 +02:00
hardware Put all firmware in $out/lib/firmware 2015-08-25 00:40:34 +02:00
installer Fix nixos-upgrade 2015-10-05 09:26:30 +02:00
misc xtreemfs: add nixos module 2015-09-22 21:46:52 +02:00
profiles nixos: add xfs support to profiles/minimal 2015-09-18 18:58:18 +00:00
programs Manual: Remove store path references 2015-09-24 11:50:58 +02:00
security nixos: fix some types 2015-09-18 18:48:50 +00:00
services copy-com service: order after network-online.target 2015-10-13 21:02:01 +02:00
system Factor out option renaming 2015-10-14 18:18:47 +02:00
tasks Fix typo in nixos/modules/tasks/filesystems/nfs.nix. 2015-10-14 08:48:34 +08:00
testing test-instrumentation.nix: Prevent calling a pager 2015-01-15 14:39:29 +01:00
virtualisation nixos/docker: default storageDriver to "devicemapper" 2015-10-04 14:34:38 +02:00
module-list.nix supplicant module: extended module for wpa_supplicant 2015-10-06 20:12:40 +02:00
rename.nix Factor out option renaming 2015-10-14 18:18:47 +02:00