2017-01-07 19:16:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.beets;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2017-09-26 23:40:31 +02:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
options = {
|
|
|
|
programs.beets = {
|
|
|
|
settings = mkOption {
|
|
|
|
type = types.attrs;
|
|
|
|
default = {};
|
2017-01-15 20:03:55 +01:00
|
|
|
description = ''
|
|
|
|
Configuration written to
|
|
|
|
<filename>~/.config/beets/config.yaml</filename>
|
|
|
|
'';
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (cfg.settings != {}) {
|
|
|
|
home.packages = [ pkgs.beets ];
|
|
|
|
|
2017-10-24 18:30:35 +02:00
|
|
|
xdg.configFile."beets/config.yaml".text =
|
2017-01-07 19:16:26 +01:00
|
|
|
builtins.toJSON config.programs.beets.settings;
|
|
|
|
};
|
|
|
|
}
|