home-manager/modules/programs/beets.nix

34 lines
581 B
Nix
Raw Normal View History

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