32 lines
555 B
Nix
32 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";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|