1

Modules/Rmpc: Add rmpc module

This commit is contained in:
2025-07-05 18:12:03 +02:00
parent ab49478b38
commit 4fe668ee9c
3 changed files with 72 additions and 2 deletions

View File

@ -3,18 +3,18 @@
# Obsolete modules are kept in "1_deprecated" for reference.
# My own HM modules
./ags
./chromium
./color
./docs
./firefox
./fish
./hyprland
./hyprpanel
./kitty
./latex
./neovim
./nnn
./paths
./rmpc
./rofi
./waybar
./zathura

View File

@ -0,0 +1,61 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.modules) rmpc;
in {
options.modules.rmpc = import ./options.nix {inherit lib mylib;};
config = lib.mkIf rmpc.enable {
assertions = [
{
assertion = config.services.mpd.enable;
message = "Enabling rmpc requires mpd!";
}
];
programs.rmcp.enable = true;
home.file = {
".config/rmpc/config.ron".text = ''
address: "127.0.0.1:${builtins.toString config.services.mpd.network.port}"
theme: "chriphost"
rewind_to_start_sec: 30 // rewind skips to start of the same track if more than 30 seconds were played
// show_playlists_in_browser: All
'';
".config/rmpc/themes/chriphost.ron".text = ''
cava: (
framerate: 60, // default 60
autosens: true, // default true
sensitivity: 100, // default 100
lower_cutoff_freq: 50, // not passed to cava if not provided
higher_cutoff_freq: 10000, // not passed to cava if not provided
input: (
method: Fifo,
source: "/tmp/mpd.fifo",
sample_rate: 44100,
channels: 2,
sample_bits: 16,
),
smoothing: (
noise_reduction: 77, // default 77
monstercat: false, // default false
waves: false, // default false
),
// this is a list of floating point numbers thats directly passed to cava
// they are passed in order that they are defined
eq: []
),
'';
};
};
}

View File

@ -0,0 +1,9 @@
{
lib,
mylib,
...
}:
with lib;
with mylib.modules; {
enable = mkEnableOption "rmpc";
}