mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
wayland
This commit is contained in:
parent
1dceb31d30
commit
3370487652
4 changed files with 22 additions and 6 deletions
|
|
@ -25,7 +25,13 @@
|
|||
env = [
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
];
|
||||
] ++ (lib.optionals (config.networking.hostName == "death-pc") [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
]);
|
||||
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
|
|
@ -260,11 +266,11 @@
|
|||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
# Suspend the laptop after 30 minutes
|
||||
{
|
||||
# Suspend the laptop after 30 minutes, but NOT the desktop
|
||||
(lib.mkIf (config.networking.hostName != "death-pc") {
|
||||
timeout = 2800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
# This is to fix clementine gui not showing up on wayland
|
||||
environment.variables.QT_QPA_PLATFORM = "wayland";
|
||||
services.udisks2.enable = true;
|
||||
# environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Required for some Electron apps
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Required for some Electron apps
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
hardware.graphics.enable32Bit = true;
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.enable = true; # Required for HDMI/DP audio on many cards
|
||||
powerManagement.finegrained = false;
|
||||
open = true; # Use the open-source kernel module (recommended for RTX 20+ cards)
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@
|
|||
|
||||
# Use linux_zen kernel for performance improvements
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.modeset=1"
|
||||
"nvidia_drm.fbdev=1"
|
||||
];
|
||||
|
||||
# Fix for resume lockups on Systemd 256+ (Common in 2025/2026)
|
||||
systemd.services.systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
|
||||
systemd.services.systemd-hibernate.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
|
||||
systemd.services.systemd-hybrid-sleep.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false";
|
||||
|
||||
# --- Bootloader: systemd-boot ---
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue