📺 Reorganized, changed hardware acceleration to use Nvidia, added
Nvidia powermanagement
This commit is contained in:
parent
e67a840d93
commit
759c57dfac
@ -13,16 +13,15 @@ in
|
||||
|
||||
# Autostart
|
||||
exec-once = [
|
||||
"${app.browser}"
|
||||
"${app.terminal}"
|
||||
app.browser
|
||||
app.terminal
|
||||
"hypridle"
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
# "waybar"
|
||||
"waypaper --restore"
|
||||
];
|
||||
|
||||
env = [
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto" # Tell Electron apps to use Wayland
|
||||
];
|
||||
|
||||
general = {
|
||||
|
@ -1,19 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
];
|
||||
|
||||
# For hardware acceleration
|
||||
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Used for hardware-acceleration
|
||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||
];
|
||||
};
|
||||
hardware.graphics.enable = true;
|
||||
}
|
||||
|
@ -1,11 +1,26 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
# Use closed-source drivers
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
|
||||
|
||||
# For hardware acceleration
|
||||
environment.sessionVariables.LIBVA_DRIVER_NAME = "nvidia";
|
||||
|
||||
hardware = {
|
||||
graphics.extraPackages = with pkgs; [
|
||||
# Used for hardware-acceleration
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
# Use closed-source drivers
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
# Enable nvidia-suspend.service, nvidia-hibernate.service and nvidia-resume.service
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Load Nvidia driver for Xorg and Wayland
|
||||
|
Loading…
x
Reference in New Issue
Block a user