marleyos/modules/home/programs/cava/default.nix

32 lines
555 B
Nix
Raw Normal View History

2024-11-16 12:34:21 -08:00
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf enabled;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.cava;
inherit (config.${namespace}) theme;
in
{
options = mkEnableModule "programs.cava";
config = mkIf cfg.enable {
enable = true;
"${theme.colors.base}" = enabled;
# TODO: disable this when mpd is not enabled? Can that be detected on non
# NixOS systems?
settings = {
input = {
method = "fifo";
source = "/tmp/mpd.fifo";
};
};
};
}