marleyos/modules/home/programs/cava/default.nix
2024-11-16 19:38:11 -08:00

31 lines
555 B
Nix

{
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";
};
};
};
}