feat: cava

This commit is contained in:
punkfairie 2025-05-31 14:22:26 -07:00
parent a0fe695cbc
commit 7855b51297
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
3 changed files with 9 additions and 8 deletions

View file

@ -45,6 +45,7 @@ in {
programs = {
amfora = enabled;
cava = enabled;
cheat = enabled;
fzf = enabled;
gh = enabled;

View file

@ -1,22 +1,21 @@
{
lib,
config,
osConfig,
lib,
pkgs,
...
}: let
cfg = config.marleyos.programs.cava;
has-mpd = osConfig.services.mpd.enable || config.services.mpd.enable;
in {
options.marleyos.programs.cava.enable = lib.mkEnableOption "cava";
config = lib.mkIf cfg.enable {
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
programs.cava = {
# FIX: Re-enable once https://github.com/NixOS/nixpkgs/pull/355948 is
# ported to nixpkgs/unstable
enable = false;
enable = true;
# TODO: disable this when mpd is not enabled? Can that be detected on non
# NixOS systems?
settings = {
input = {
input = lib.mkIf has-mpd {
method = "fifo";
source = "/tmp/mpd.fifo";
};

View file

@ -4,6 +4,7 @@
./amfora
./bat.nix
./btop.nix
./cava.nix
./cheat.nix
./curl.nix
./eza.nix