mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
33 lines
581 B
Nix
33 lines
581 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.programs.beets;
|
|
|
|
in
|
|
|
|
{
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
options = {
|
|
programs.beets = {
|
|
settings = mkOption {
|
|
type = types.attrs;
|
|
default = {};
|
|
description = ''
|
|
Configuration written to
|
|
<filename>~/.config/beets/config.yaml</filename>
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf (cfg.settings != {}) {
|
|
home.packages = [ pkgs.beets ];
|
|
|
|
xdg.configFile."beets/config.yaml".text =
|
|
builtins.toJSON config.programs.beets.settings;
|
|
};
|
|
}
|