1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/nixos/modules/config
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
..
fonts nixos/fonts: Add unifont to list of default fonts. 2015-09-26 21:04:15 +02:00
gnu.nix
gtk-exe-env.nix
i18n.nix
krb5.nix
ldap.nix nixos: fix some types 2015-09-18 18:48:50 +00:00
networking.nix networking module: add extraResolvconfConf option 2015-09-26 18:49:16 +02:00
no-x-libs.nix
nsswitch.nix
power-management.nix power management: restart post-resume.target on resume 2015-10-06 20:12:40 +02:00
pulseaudio.nix
qt-plugin-env.nix
shells-environment.nix Manual: Remove store path references 2015-09-24 11:50:58 +02:00
swap.nix
sysctl.nix
system-environment.nix
system-path.nix
timezone.nix
unix-odbc-drivers.nix
update-users-groups.pl
users-groups.nix Factor out option renaming 2015-10-14 18:18:47 +02:00
vpnc.nix
zram.nix