1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 20:19:45 +01:00
home-manager/modules/programs/beets.nix

32 lines
539 B
Nix
Raw Normal View History

2017-01-07 19:16:26 +01:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.beets;
in
{
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 ];
home.file.".config/beets/config.yaml".text =
builtins.toJSON config.programs.beets.settings;
};
}