From 3b4e7e5e902fcef0511ad852023ff6cef4008071 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 26 Jun 2022 13:37:26 +0200 Subject: Luna: Add hardware acceleration --- hosts/luna/hardware.nix | 6 ++++++ hosts/luna/home.nix | 45 +++++++++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/hosts/luna/hardware.nix b/hosts/luna/hardware.nix index ce34029..1debe13 100644 --- a/hosts/luna/hardware.nix +++ b/hosts/luna/hardware.nix @@ -53,6 +53,12 @@ in opengl = { enable = true; driSupport = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + vaapiVdpau + libvdpau-va-gl + ]; }; }; diff --git a/hosts/luna/home.nix b/hosts/luna/home.nix index 2198b63..ff3c95b 100644 --- a/hosts/luna/home.nix +++ b/hosts/luna/home.nix @@ -12,26 +12,39 @@ kcc ]; - xdg.configFile."dwmbar/config".text = '' - #!/bin/sh + #TODO: Can we just not update prev set? + programs.firefox.profiles.default.settings = { + "general.autoScroll" = true; #TODO: This is aready set in parent home + "media.ffmpeg.vaapi.enabled" = true; #Hardware acceleration + }; - # What modules, in what order - MODULES="weather wifi internet volume ram_perc cpuload cputemp battery date time" + xdg.configFile = { + "dwmbar/config".text = '' + #!/bin/sh - # Modules that require an active internet connection - ONLINE_MODULES="weather internet" + # What modules, in what order + MODULES="weather wifi internet volume ram_perc cpuload cputemp battery date time" - # Delay between showing the status bar - DELAY="0.05" + # Modules that require an active internet connection + ONLINE_MODULES="weather internet" - # Where the custom modules are stored - CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/" + # Delay between showing the status bar + DELAY="0.05" - # Separator between modules - SEPARATOR=" | " + # Where the custom modules are stored + CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/" - # Padding at the end and beggining of the status bar - RIGHT_PADDING=" " - LEFT_PADDING=" " - ''; + # Separator between modules + SEPARATOR=" | " + + # Padding at the end and beggining of the status bar + RIGHT_PADDING=" " + LEFT_PADDING=" " + ''; + + "mpv/mpv.conf".text = '' + ytdl-format=bestvideo[height<=?720][fps<=?60][vcodec!=?vp9]+bestaudio/best + hwdec + ''; + }; } -- cgit 1.4.1