mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
beets: add enable option
This commit is contained in:
parent
a37b5c9c61
commit
797fbbf826
2 changed files with 33 additions and 1 deletions
|
@ -878,6 +878,23 @@ in
|
||||||
A new module is available: 'programs.vscode'.
|
A new module is available: 'programs.vscode'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2018-12-04T21:54:38+00:00";
|
||||||
|
condition = config.programs.beets.settings != {};
|
||||||
|
message = ''
|
||||||
|
A new option 'programs.beets.enable' has been added.
|
||||||
|
Starting with state version 19.03 this option defaults to
|
||||||
|
false. For earlier versions it defaults to true if
|
||||||
|
'programs.beets.settings' is non-empty.
|
||||||
|
|
||||||
|
It is recommended to explicitly add
|
||||||
|
|
||||||
|
programs.beets.enable = true;
|
||||||
|
|
||||||
|
to your configuration.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,21 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
programs.beets = {
|
programs.beets = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default =
|
||||||
|
if versionAtLeast config.home.stateVersion "19.03"
|
||||||
|
then false
|
||||||
|
else cfg.settings != {};
|
||||||
|
defaultText = "false";
|
||||||
|
description = ''
|
||||||
|
Whether to enable the beets music library manager. This
|
||||||
|
defaults to <literal>false</literal> for state
|
||||||
|
version ≥ 19.03. For earlier versions beets is enabled if
|
||||||
|
<option>programs.beets.settings</option> is non-empty.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -24,7 +39,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.settings != {}) {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.beets ];
|
home.packages = [ pkgs.beets ];
|
||||||
|
|
||||||
xdg.configFile."beets/config.yaml".text =
|
xdg.configFile."beets/config.yaml".text =
|
||||||
|
|
Loading…
Reference in a new issue