beets: warn on implicit enable default

Before 19.03, programs.beets.enable implicitly followed whether
programs.beets.settings was non-empty. That compatibility branch was
still active for older state versions, but it was silent.

Route the default through the shared state-version helper so legacy
users get a consistent deprecation warning before the implicit
enablement is cleaned up. Add focused tests for the legacy and current
default branches alongside the existing beets coverage.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2026-03-13 16:05:03 -05:00
parent a49e2f1b5b
commit 111b158a98
4 changed files with 43 additions and 3 deletions

View file

@ -27,9 +27,24 @@ in
programs.beets = {
enable = mkOption {
type = types.bool;
default =
if lib.versionAtLeast config.home.stateVersion "19.03" then false else cfg.settings != { };
defaultText = "false";
inherit
(lib.hm.deprecations.mkStateVersionOptionDefault {
inherit (config.home) stateVersion;
since = "19.03";
optionPath = [
"programs"
"beets"
"enable"
];
legacy = {
value = cfg.settings != { };
text = "config.programs.beets.settings != { }";
};
current.value = false;
})
default
defaultText
;
description = ''
Whether to enable the beets music library manager. This
defaults to `false` for state