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