diff --git a/modules/programs/infat.nix b/modules/programs/infat.nix index 0c683ba03..10a47b06d 100644 --- a/modules/programs/infat.nix +++ b/modules/programs/infat.nix @@ -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 ]; diff --git a/tests/modules/programs/infat/deprecated-auto-activate-bool.nix b/tests/modules/programs/infat/deprecated-auto-activate-bool.nix index e4f98863c..2ce41e624 100644 --- a/tests/modules/programs/infat/deprecated-auto-activate-bool.nix +++ b/tests/modules/programs/infat/deprecated-auto-activate-bool.nix @@ -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. '' ];