home-manager/modules/programs/beets.nix
Robert Helgesson d7d02c3ce8
Initial import
2017-01-14 13:15:24 +01:00

29 lines
486 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.beets;
in
{
options = {
programs.beets = {
settings = mkOption {
type = types.attrs;
default = {};
description = "Configuration written to ~/.config/beets/config.yaml";
};
};
};
config = mkIf (cfg.settings != {}) {
home.packages = [ pkgs.beets ];
home.file.".config/beets/config.yaml".text =
builtins.toJSON config.programs.beets.settings;
};
}