mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-09-13 05:11:45 +02:00
Declare the output chain via services.easyeffects.extraPresets and load it with preset.output, replacing the GUI-only configuration that did not survive the tmpfs root. autogain target is set to -12 dB (EasyEffects defaults to -23, which is too quiet for playback); the limiter acts as a transparent -1 dB safety net via threshold=-1 and gain-boost=false.
72 lines
2.0 KiB
Nix
72 lines
2.0 KiB
Nix
{
|
|
pkgs,
|
|
pkgs-x64,
|
|
...
|
|
}:
|
|
# media - control and enjoy audio/video
|
|
{
|
|
home.packages = with pkgs; [
|
|
# audio control
|
|
pavucontrol
|
|
playerctl
|
|
pulsemixer
|
|
imv # simple image viewer
|
|
|
|
# video/audio tools
|
|
libva-utils
|
|
vdpauinfo
|
|
vulkan-tools
|
|
mesa-demos
|
|
nvitop
|
|
# Zoom: Settings > Share Screen > Advanced > Screen Capture Mode on Wayland > PipeWire Mode.
|
|
(pkgs-x64.zoom-us)
|
|
];
|
|
|
|
programs.mpv = {
|
|
enable = true;
|
|
defaultProfiles = [ "gpu-hq" ];
|
|
scripts = [ pkgs.mpvScripts.mpris ];
|
|
};
|
|
|
|
services = {
|
|
playerctld.enable = true;
|
|
|
|
# PipeWire audio effects daemon for output loudness normalization (e.g.
|
|
# bilibili videos with inconsistent volume).
|
|
#
|
|
# The chain is declared here instead of configured in the GUI: autogain
|
|
# normalizes loudness, limiter is a transparent safety net against peaks.
|
|
# EasyEffects follows the system default output device by default
|
|
# (`useDefaultOutputDevice`), so no GUI state needs to be persisted.
|
|
easyeffects = {
|
|
enable = true;
|
|
|
|
extraPresets.loudness-normalization.output = {
|
|
blocklist = [ ];
|
|
"plugins_order" = [
|
|
"autogain#0"
|
|
"limiter#0"
|
|
];
|
|
"autogain#0" = {
|
|
bypass = false;
|
|
# EasyEffects defaults to -23 dB (the EBU R128 broadcast standard),
|
|
# which is too quiet for playback. -12 dB is a common value in
|
|
# community presets (e.g. JackHack96's "Advanced Auto Gain") and
|
|
# still leaves enough headroom for the limiter below.
|
|
target = -12.0;
|
|
};
|
|
"limiter#0" = {
|
|
bypass = false;
|
|
# Pure brick-wall safety net: leave 1 dB of ceiling margin and add no
|
|
# makeup gain, so autogain stays in charge of loudness.
|
|
threshold = -1.0;
|
|
gain-boost = false;
|
|
};
|
|
};
|
|
|
|
# Load the preset on the output pipeline when the daemon starts.
|
|
preset.output = "loudness-normalization";
|
|
};
|
|
};
|
|
}
|