mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-20 09:19:39 +01:00
beets: add enable option
This commit is contained in:
parent
a37b5c9c61
commit
797fbbf826
2 changed files with 33 additions and 1 deletions
|
|
@ -13,6 +13,21 @@ in
|
|||
|
||||
options = {
|
||||
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 {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
|
|
@ -24,7 +39,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.settings != {}) {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.beets ];
|
||||
|
||||
xdg.configFile."beets/config.yaml".text =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue