programs/hyprland: disable Unknown-1 ghost monitor, move env variables to environment.d, add nvidia env variables

This commit is contained in:
Anthony Rodriguez 2025-01-28 19:52:19 +01:00
parent d0242089e2
commit a9a07fea6d
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA

View file

@ -7,7 +7,7 @@
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;
inherit (lib) mkIf; inherit (lib) mkIf optionalAttrs optionalString;
inherit (lib'.generators) toHyprConf; inherit (lib'.generators) toHyprConf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
@ -63,7 +63,8 @@ in {
inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast
gnomeControlCenter gnomeControlCenter
]; ];
files.".config/hypr/hyprland.conf".text = toHyprConf { files = {
".config/hypr/hyprland.conf".text = toHyprConf {
attrs = attrs =
{ {
xwayland = { xwayland = {
@ -71,7 +72,6 @@ in {
}; };
env = [ env = [
"GDK_SCALE,1"
]; ];
cursor = { cursor = {
@ -80,6 +80,7 @@ in {
monitor = [ monitor = [
"eDP-1, preferred, auto, 1.33" "eDP-1, preferred, auto, 1.33"
"Unknown-1,disabled"
]; ];
workspace = [ workspace = [
"special:terminal, on-created-empty:foot" "special:terminal, on-created-empty:foot"
@ -145,12 +146,7 @@ in {
middle_click_paste = false; middle_click_paste = false;
}; };
} }
// lib.optionalAttrs styleCfg.enable { // optionalAttrs styleCfg.enable {
env = [
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
];
general = { general = {
border_size = 4; border_size = 4;
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})"; "col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
@ -162,6 +158,24 @@ in {
} }
// import ./binds.nix lib; // import ./binds.nix lib;
}; };
".config/environment.d/${config.local.homeVars.userEnvFile}.conf".text =
''
GDK_SCALE="1"
''
+ optionalString styleCfg.enable ''
HYPRCURSOR_THEME="${styleCfg.cursorTheme.name}"
HYPRCURSOR_SIZE="${toString styleCfg.cursorTheme.size}"
XCURSOR_SIZE="${toString styleCfg.cursorTheme.size}"
''
+ optionalString config.local.modules.nvidia.enable ''
LIBVA_DRIVER_NAME="nvidia"
__GLX_VENDOR_LIBRARY_NAME="nvidia"
XDG_SESSION_TYPE="wayland"
GBM_BACKEND="nvidia-drm"
'';
};
}; };
}; };
} }