infat: use deprecation warning helper
This commit is contained in:
parent
18b4e1ea6f
commit
dc641330e2
2 changed files with 12 additions and 7 deletions
|
|
@ -117,11 +117,17 @@ in
|
|||
(lib.hm.assertions.assertPlatform "programs.infat" pkgs lib.platforms.darwin)
|
||||
];
|
||||
|
||||
warnings = lib.optional cfg.autoActivate._legacyBoolean ''
|
||||
Using `programs.infat.autoActivate` as a Boolean is deprecated and will be
|
||||
removed in a future release. Please use `programs.infat.autoActivate.enable`
|
||||
instead.
|
||||
'';
|
||||
warnings = lib.optional cfg.autoActivate._legacyBoolean (
|
||||
lib.hm.deprecations.mkDeprecatedOptionValueWarning {
|
||||
option = [
|
||||
"programs"
|
||||
"infat"
|
||||
"autoActivate"
|
||||
];
|
||||
old = "a Boolean";
|
||||
replacement = "`programs.infat.autoActivate.enable`";
|
||||
}
|
||||
);
|
||||
|
||||
home = {
|
||||
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ _:
|
|||
asserts.warnings.expected = [
|
||||
''
|
||||
Using `programs.infat.autoActivate` as a Boolean is deprecated and will be
|
||||
removed in a future release. Please use `programs.infat.autoActivate.enable`
|
||||
instead.
|
||||
removed in a future release. Please use `programs.infat.autoActivate.enable` instead.
|
||||
''
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue