From 9aecfe94a7d6e3406f4083533c4f030291014681 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 12:34:21 -0800 Subject: [PATCH] feat(home): Cava --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/cava/default.nix | 31 +++++++++++++++++++++++ old/home/programs/cava.nix | 17 ------------- 3 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 modules/home/programs/cava/default.nix delete mode 100644 old/home/programs/cava.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 0adc49e..e397c25 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -17,6 +17,7 @@ in amfora = enabled; bat = enabled; btop = enabled; + cava = enabled; fish = enabled; journalctl = enabled; neo = enabled; diff --git a/modules/home/programs/cava/default.nix b/modules/home/programs/cava/default.nix new file mode 100644 index 0000000..bda2992 --- /dev/null +++ b/modules/home/programs/cava/default.nix @@ -0,0 +1,31 @@ +{ + 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"; + }; + }; + }; +} diff --git a/old/home/programs/cava.nix b/old/home/programs/cava.nix deleted file mode 100644 index 4b7138c..0000000 --- a/old/home/programs/cava.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: -{ - programs.cava = { - enable = true; - - rose-pine.enable = true; - - # TODO: disable this when mpd is not enabled? Can that be detected on non - # NixOS systems? - settings = { - input = { - method = "fifo"; - source = "/tmp/mpd.fifo"; - }; - }; - }; -}