mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-19 13:06:52 +02:00
feat: modular hyprland's configurations
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
options.modules.desktop.hyprland = {
|
||||
nvidia = mkEnableOption "whether nvidia GPU is used";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.nvidia) {
|
||||
systemd.user.sessionVariables = {
|
||||
# for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME" = "nvidia";
|
||||
"XDG_SESSION_TYPE" = "wayland";
|
||||
"GBM_BACKEND" = "nvidia-drm";
|
||||
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
||||
# fix https://github.com/hyprwm/Hyprland/issues/1520
|
||||
"WLR_NO_HARDWARE_CURSORS" = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user