feat: intel encoding or so lololo

This commit is contained in:
s-prechtl 2025-09-10 14:31:52 +02:00
parent b1167e8ad4
commit 62ce6b0f45
5 changed files with 98 additions and 32 deletions

63
flake.lock generated
View file

@ -40,16 +40,16 @@
"brew-src": {
"flake": false,
"locked": {
"lastModified": 1753461463,
"narHash": "sha256-kGc7pRH0diLzKmOHsEFA8sZ9NJpgT+tqxAMsuqNd5Po=",
"lastModified": 1756059815,
"narHash": "sha256-UALOxoXoFIHbwKzcqbqCAqw5cC0MJEehLaWSet5vxfE=",
"owner": "Homebrew",
"repo": "brew",
"rev": "4d14be89e99a45181c18e96a5f19a5b43343cc0f",
"rev": "02947ea4edbdef5fcce9ee57fa289547f4d096c9",
"type": "github"
},
"original": {
"owner": "Homebrew",
"ref": "4.5.13",
"ref": "4.6.7",
"repo": "brew",
"type": "github"
}
@ -199,15 +199,16 @@
]
},
"locked": {
"lastModified": 1756991914,
"narHash": "sha256-4ve/3ah5H/SpL2m3qmZ9GU+VinQYp2MN1G7GamimTds=",
"lastModified": 1756679287,
"narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b08f8737776f10920c330657bee8b95834b7a70f",
"rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
@ -219,11 +220,11 @@
]
},
"locked": {
"lastModified": 1754613544,
"narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=",
"lastModified": 1756991914,
"narHash": "sha256-4ve/3ah5H/SpL2m3qmZ9GU+VinQYp2MN1G7GamimTds=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f",
"rev": "b08f8737776f10920c330657bee8b95834b7a70f",
"type": "github"
},
"original": {
@ -317,11 +318,11 @@
]
},
"locked": {
"lastModified": 1751313918,
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
"lastModified": 1755825449,
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
"type": "github"
},
"original": {
@ -336,11 +337,11 @@
"brew-src": "brew-src"
},
"locked": {
"lastModified": 1754250993,
"narHash": "sha256-MEin+qoQKtFC1b0f4tnQ+Z82BQWSCgh6Ef7rpmH9gig=",
"lastModified": 1756398546,
"narHash": "sha256-n4GVDLhKu65XFraJuCzap2AaZji4xhPaZMTJ8aQdD3s=",
"owner": "zhaofengli",
"repo": "nix-homebrew",
"rev": "314d057294e79bc2596972126b84c6f9f144499a",
"rev": "3aa475996cb3bc1ecefa88c99c466e6f0bc17431",
"type": "github"
},
"original": {
@ -351,11 +352,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1754564048,
"narHash": "sha256-dz303vGuzWjzOPOaYkS9xSW+B93PSAJxvBd6CambXVA=",
"lastModified": 1756925795,
"narHash": "sha256-kUb5hehaikfUvoJDEc7ngiieX88TwWX/bBRX9Ar6Tac=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "26ed7a0d4b8741fe1ef1ee6fa64453ca056ce113",
"rev": "ba6fab29768007e9f2657014a6e134637100c57d",
"type": "github"
},
"original": {
@ -415,11 +416,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1754689972,
"narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"lastModified": 1756886854,
"narHash": "sha256-6tooT142NLcFjt24Gi4B0G1pgWLvfw7y93sYEfSHlLI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"rev": "0e6684e6c5755325f801bda1751a8a4038145d7d",
"type": "github"
},
"original": {
@ -463,11 +464,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"lastModified": 1756787288,
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
"type": "github"
},
"original": {
@ -495,11 +496,11 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1752480373,
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {
@ -568,11 +569,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1754739276,
"narHash": "sha256-HQotJt480NsHIEgkt2ZiuvjGa50sc7cRhhsZXqZIWpU=",
"lastModified": 1756999202,
"narHash": "sha256-AiJDRmIt2DuMk2IlBPnMG52ghUI9+D1nO7JRBF2vnZ0=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "b5b7136bb6ed82504c3613a7e0cbe6f69b72e7f1",
"rev": "369fbe5c53420b1a17295c5e85ea0dbe02fbcfbd",
"type": "github"
},
"original": {

View file

@ -17,7 +17,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-stable = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";

View file

@ -4,6 +4,7 @@
inputs,
config,
pkgs,
lib,
...
}: let
serverIP = "192.168.0.201";
@ -13,6 +14,8 @@ in {
# Include the results of the hardware scan.
./hardware-configuration.nix
./secrets.nix
./nvidia.nix
./intel.nix
];
# Use the systemd-boot EFI boot loader.

View file

@ -0,0 +1,11 @@
{config, pkgs, ...}: {
services.xserver.videoDrivers = [ "modesetting" ];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # Enable Hardware Acceleration
vpl-gpu-rt # Enable QSV
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
}

View file

@ -0,0 +1,51 @@
{config, lib, ...}:
{
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
];
# Enable OpenGL
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:60:0:0";
};
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}