Compare commits

...

2 Commits

Author SHA1 Message Date
759c57dfac
📺 Reorganized, changed hardware acceleration to use Nvidia, added
Nvidia powermanagement
2025-01-11 23:50:44 +01:00
e67a840d93
🧑‍💻 Use Systemd for Hyprland 2025-01-11 23:24:55 +01:00
5 changed files with 31 additions and 24 deletions

View File

@ -12,5 +12,8 @@
./swaync
];
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ]; # Import environment into systemd
};
}

View File

@ -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 = {

View File

@ -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;
}

View File

@ -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

View File

@ -17,6 +17,7 @@
hyprland = {
enable = true;
xwayland.enable = true;
withUWSM = true;
};
hyprlock.enable = true; # Lock screen
};