1 # This is a test to show that mkAliasOptionModule sets the priority correctly
4 # This test shows that an alias with a low priority is able to be overridden
5 # with a non-aliased option.
20 # A simple boolean option that can be enabled or disabled.
22 type = types.nullOr types.bool;
30 # mkAliasOptionModule sets warnings, so this has to be defined.
34 type = types.listOf types.str;
35 example = [ "The `foo' service is deprecated and will go away soon!" ];
37 This option allows modules to show warnings to users during
38 the evaluation of the system configuration.
44 # Create an alias for the "enable" option.
45 (mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
47 # Disable the aliased option, but with a default (low) priority so it
48 # should be able to be overridden by the next import.
49 ( { config, lib, ... }:
51 enableAlias = mkDefault false;
55 # Enable the normal (non-aliased) option.
56 ( { config, lib, ... }: