1 # This is a test to show that mkAliasOptionModule sets the priority correctly
4 # This test shows that an alias with a high priority is able to override
5 # a non-aliased option.
13 # A simple boolean option that can be enabled or disabled.
14 enable = lib.mkOption {
15 type = types.nullOr types.bool;
23 # mkAliasOptionModule sets warnings, so this has to be defined.
27 type = types.listOf types.str;
28 example = [ "The `foo' service is deprecated and will go away soon!" ];
30 This option allows modules to show warnings to users during
31 the evaluation of the system configuration.
37 # Create an alias for the "enable" option.
38 (mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
40 # Disable the aliased option with a high priority so it
41 # should override the next import.
42 ( { config, lib, ... }:
44 enableAlias = lib.mkForce false;
48 # Enable the normal (non-aliased) option.
49 ( { config, lib, ... }: