3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/system/boot
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
..
loader Factor out option renaming 2015-10-14 18:18:47 +02:00
coredump.nix Added config options for systemd-coredump functionality. 2015-05-24 18:22:53 -06:00
emergency-mode.nix
kernel.nix Put all firmware in $out/lib/firmware 2015-08-25 00:40:34 +02:00
kexec.nix
luksroot.nix nixos: fix some types 2015-09-18 18:48:50 +00:00
modprobe.nix kmod-debian-aliases: init at 21-1 2015-09-13 10:55:44 +02:00
networkd.nix Create systemd-{network,resolve} user/group unconditionally 2015-07-22 12:23:45 +02:00
pbkdf2-sha512.c
readonly-mountpoint.c
resolved.nix Create systemd-{network,resolve} user/group unconditionally 2015-07-22 12:23:45 +02:00
shutdown.nix
stage-1-init.sh Remove unnecessary "|| true" from the stage 1 script 2015-09-28 22:15:47 +02:00
stage-1.nix Add filesystem option to automatically grow to the maximum size 2015-09-24 19:59:44 +02:00
stage-2-init.sh stage-2: Don't run hwclock in containers 2015-07-22 12:23:52 +02:00
stage-2.nix stage-2-init: Don't depend on sysvtools 2015-04-20 11:32:28 +02:00
systemd-lib.nix Set ‘allowSubstitutes = false’ on various derivations 2015-07-09 15:10:37 +02:00
systemd-unit-options.nix Some more type cleanup 2015-06-15 18:18:46 +02:00
systemd.nix Factor out option renaming 2015-10-14 18:18:47 +02:00
timesyncd.nix Don't include networkd units unless enabled 2015-04-19 22:06:45 +02:00
tmp.nix