Files
nix-config/home/linux/gui/base/media.nix
T
ryan4yin | 二花 c277c81cd6 feat(nixpak): sandbox six desktop apps (#497)
* feat(nixpak): sandbox six desktop apps

* chore(nixpak): trim OBS plugin set

* fix(nixpak): enable OBS on aarch64

* fix(nixpak): let imv read the full home directory

* fix(home): drop redundant freerdp package

* fix(nixpak): grant OBS access to V4L2 camera devices

* fix(nixpak): expose V4L2 sysfs to OBS

* fix(nixpak): expose NVIDIA encode library to OBS

* docs(nixpak): record OBS interactive validation

* docs(nixpak): record OBS RTMP validation

* fix(nixpak): run MuseScore via XWayland and PulseAudio

* docs(nixpak): explain app sandboxing rationale

* fix(nixpak): route MuseScore ALSA through PipeWire
2026-11-01 01:24:47 -05:00

85 lines
2.6 KiB
Nix

{
pkgs,
lib,
...
}:
# media - control and enjoy audio/video
{
home.packages =
with pkgs;
[
# audio control
pavucontrol
playerctl
pulsemixer
pkgs.nixpaks.imv # simple image viewer
# music
go-musicfox # TUI NetEase Cloud Music client; plays through mpv (configured below)
# video/audio tools
libva-utils
vdpauinfo
vulkan-tools
mesa-demos
nvitop
]
# Zoom: Settings > Share Screen > Advanced > Screen Capture Mode on Wayland > PipeWire Mode.
# zoom-us ships only an x86_64 Linux client, so the aarch64 host skips it.
++ lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ pkgs.nixpaks.zoom ];
programs.mpv = {
enable = true;
package = pkgs.nixpaks.mpv;
defaultProfiles = [ "gpu-hq" ];
};
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 = {
# Excluded from output processing ("Excluded Apps" in the GUI). Matched
# against the stream's app id, process binary or node name; browsers need
# "node:media-name" plus StreamOutputs.blocklistUsesMediaName. Loading a
# preset replaces the GUI-managed list, so exclusions belong here.
blocklist = [
"mpv"
"ZOOM VoiceEngine"
"Wemeet VoiceEngine"
];
"plugins_order" = [
"autogain#0"
"limiter#0"
];
"autogain#0" = {
bypass = false;
# target is set per host (home/hosts/linux/*.nix) because the
# comfortable loudness depends on the physical output device:
# -23 dB (EBU R128 broadcast standard) on desktop speakers,
# -12 dB on quiet laptop speakers. EasyEffects' own default is -23.
};
"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";
};
};
}