mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 03:59:46 +01:00
31 lines
539 B
Nix
31 lines
539 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
|
|
<filename>~/.config/beets/config.yaml</filename>
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf (cfg.settings != {}) {
|
|
home.packages = [ pkgs.beets ];
|
|
|
|
home.file.".config/beets/config.yaml".text =
|
|
builtins.toJSON config.programs.beets.settings;
|
|
};
|
|
}
|