infat: use deprecation warning helper

This commit is contained in:
Austin Horstman
2026-06-01 14:41:17 -05:00
parent 18b4e1ea6f
commit dc641330e2
2 changed files with 12 additions and 7 deletions

View File

@@ -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 ];

View File

@@ -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.
''
];