Skip to content

Commit

Permalink
feat(nixos,laptop): Enable hardware video transcoding for game streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Dec 12, 2024
1 parent ca30013 commit 5820e64
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions hosts/laptop/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
{ config, lib, pkgs, modulesPath, ... }:

{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/71f0a300-d3af-4d9c-bcae-4da7b2cb7cdd";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/71f0a300-d3af-4d9c-bcae-4da7b2cb7cdd";
fsType = "ext4";
};

boot.initrd.luks.devices."luks-478962df-c7d5-4e0c-9f30-f5435e27612a".device = "/dev/disk/by-uuid/478962df-c7d5-4e0c-9f30-f5435e27612a";
boot.initrd.luks.devices."luks-478962df-c7d5-4e0c-9f30-f5435e27612a".device =
"/dev/disk/by-uuid/478962df-c7d5-4e0c-9f30-f5435e27612a";

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/EFA5-597E";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/EFA5-597E";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};

swapDevices = [ ];

Expand All @@ -38,5 +38,21 @@
# networking.interfaces.wwp0s20f0u6i12.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;

# enable VAAPI
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver # previously vaapiIntel
vaapiVdpau
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
vpl-gpu-rt # QSV on 11th gen or newer
];
};
}

0 comments on commit 5820e64

Please sign in to comment.