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