From 51659cddc4e5b4f640d88deca1e76af12fb5fffe Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Mon, 1 Jan 2024 16:32:29 +0300 Subject: [PATCH] roles/graphical & roles/media-client: move mpv + add cdda support + setup x11/wayland support in place Signed-off-by: Ivan Bushchik --- roles/graphical.nix | 1 - roles/media-client.nix | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/roles/graphical.nix b/roles/graphical.nix index 9bf77ec..2d2eefb 100644 --- a/roles/graphical.nix +++ b/roles/graphical.nix @@ -12,7 +12,6 @@ in { alacritty pavucontrol bottom - mpv glib ffmpeg cinnamon.nemo diff --git a/roles/media-client.nix b/roles/media-client.nix index eab727a..5517754 100644 --- a/roles/media-client.nix +++ b/roles/media-client.nix @@ -5,6 +5,25 @@ in { options.my.roles.media-client.enable = lib.mkEnableOption "Enable media players, downloaders, etc."; config = lib.mkIf (cfg.enable) { - environment.systemPackages = with pkgs; [ vlc yt-dlp ffmpeg ]; + nixpkgs.overlays = [ + (self: super: { + mpv = super.wrapMpv (super.mpv.unwrapped.override { + cddaSupport = true; + # No pulse today + pulseSupport = false; + pipewireSupport = true; + screenSaverSupport = false; + # MATE only + x11Support = config.my.roles.graphical.basic.enable; + # Sway only + waylandSupport = config.my.roles.graphical.enable; + javascriptSupport = false; + }) { }; + }) + ]; + environment.systemPackages = with pkgs; [ vlc yt-dlp ffmpeg mpv ]; + + # Add support for CD/DVD/BD drives + boot.initrd.availableKernelModules = [ "sr_mod" ]; }; }