mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
28 lines
486 B
Nix
28 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;
|
|
};
|
|
}
|