beets: allow custom package (#952)

This commit is contained in:
Bernardo Meurer 2019-12-18 00:25:52 +00:00 committed by Silvan Mosberger
parent 8abaa025ec
commit 0f1c9f25cf

View file

@ -28,6 +28,17 @@ in
'';
};
package = mkOption {
type = types.package;
default = pkgs.beets;
defaultText = literalExample "pkgs.beets";
example = literalExample "(pkgs.beets.override { enableCheck = true; })";
description = ''
The <literal>beets</literal> package to use.
Can be used to specify extensions.
'';
};
settings = mkOption {
type = types.attrs;
default = {};
@ -40,7 +51,7 @@ in
};
config = mkIf cfg.enable {
home.packages = [ pkgs.beets ];
home.packages = [ cfg.package ];
xdg.configFile."beets/config.yaml".text =
builtins.toJSON config.programs.beets.settings;