From 2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 7 Jul 2024 11:07:47 +0300 Subject: [machines] Updated sysidentity and moved stuff from configuration to hardware-configuration --- machines/juno/hardware-configuration.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'machines/juno/hardware-configuration.nix') diff --git a/machines/juno/hardware-configuration.nix b/machines/juno/hardware-configuration.nix index 3318aca..d732f30 100644 --- a/machines/juno/hardware-configuration.nix +++ b/machines/juno/hardware-configuration.nix @@ -1,9 +1,4 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ +{ config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -41,4 +36,17 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # Hardware acceleration + # https://nixos.wiki/wiki/Accelerated_Video_Playback + nixpkgs.config.packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + ]; + }; } -- cgit v1.3.1-26-gb76a