Commit 0b898b64eec4
Changed files (3)
home
common
desktop
imperative
aomi
kyushu
home/common/desktop/mpv.nix
@@ -1,20 +1,31 @@
-{ pkgs, ... }:
{
- # Use mpv-unwrapped and load scripts via config file
- # Avoids nixpkgs mpv wrapper breakage
- home.packages = [
+ lib,
+ osConfig ? null,
+ pkgs,
+ ...
+}:
+let
+ isNixOS = osConfig != null;
+in
+{
+ # Fedora's native MPV integrates with its Mesa/Vulkan stack; NixOS needs the
+ # unwrapped package to avoid the nixpkgs MPV wrapper breakage.
+ home.packages = lib.optionals isNixOS [
pkgs.mpv-unwrapped
pkgs.mpvScripts.mpris
pkgs.mpvScripts.modernz
];
- # Configure mpv via xdg.configFile
- xdg.configFile."mpv/mpv.conf".text = ''
- hwdec=auto
- osc=no
- scripts=${pkgs.mpvScripts.mpris}/share/mpv/scripts/mpris.so
- scripts-append=${pkgs.mpvScripts.modernz}/share/mpv/scripts/modernz.lua
- '';
+ # The Nix-only scripts are dynamically loaded modules and must not be added
+ # to the Fedora MPV configuration.
+ xdg.configFile."mpv/mpv.conf" = lib.mkIf isNixOS {
+ text = ''
+ hwdec=auto
+ osc=no
+ scripts=${pkgs.mpvScripts.mpris}/share/mpv/scripts/mpris.so
+ scripts-append=${pkgs.mpvScripts.modernz}/share/mpv/scripts/modernz.lua
+ '';
+ };
xdg.configFile."mpv/input.conf".text = ''
WHEEL_UP seek 10
imperative/aomi/bootstrap.sh
@@ -146,14 +146,21 @@ POLICY
install_native_apps() {
log_info "Installing native apps..."
- # Niri compositor + Wayland essentials + terminal
- log_info "Installing niri, Wayland support, and kitty..."
+ # GPU Screen Recorder is not in Fedora's official repositories.
+ log_info "Enabling GPU Screen Recorder COPR..."
+ sudo dnf copr enable -y brycensranch/gpu-screen-recorder-git
+
+ # Niri compositor + Wayland essentials + native multimedia apps
+ log_info "Installing niri, Wayland support, and native multimedia apps..."
sudo dnf install -y \
acpi \
brightnessctl \
podman podman-docker \
niri \
kitty \
+ mpv \
+ gpu-screen-recorder \
+ gtk4-layer-shell \
xwayland-satellite \
xdg-desktop-portal-gnome \
xdg-desktop-portal-gtk \
imperative/kyushu/bootstrap.sh
@@ -166,8 +166,12 @@ setup_system_configs() {
install_native_apps() {
log_info "Installing native apps..."
- # Niri compositor + Wayland essentials + terminal
- log_info "Installing niri, Wayland support, and kitty..."
+ # GPU Screen Recorder is not in Fedora's official repositories.
+ log_info "Enabling GPU Screen Recorder COPR..."
+ sudo dnf copr enable -y brycensranch/gpu-screen-recorder-git
+
+ # Niri compositor + Wayland essentials + native multimedia apps
+ log_info "Installing niri, Wayland support, and native multimedia apps..."
sudo dnf install -y \
acpi \
brightnessctl \
@@ -176,6 +180,9 @@ install_native_apps() {
niri \
wl-mirror \
kitty \
+ mpv \
+ gpu-screen-recorder \
+ gtk4-layer-shell \
xwayland-satellite \
xdg-desktop-portal-gnome \
xdg-desktop-portal-gtk \