nixos-configs/modules/desktop/display-manager/hyprland.nix

65 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}: let
inherit (lib) filterAttrs hasPrefix optionals;
inherit (import ./setupMonitors.nix {inherit config pkgs;}) setupMonitors;
cfg = config.roles.desktop;
# Nix stuff
2024-06-24 12:30:49 -04:00
cfgHypr =
config
.home-manager
.users
.${cfg.user}
2024-06-24 12:30:49 -04:00
.wayland
.windowManager
.hyprland;
devices = filterAttrs (n: v: hasPrefix "device:" n) cfgHypr.settings;
in {
home-manager.users.greeter = {
wayland.windowManager.hyprland = {
enable = true;
package = cfgHypr.finalPackage;
systemd.enable = false;
settings =
{
inherit (cfgHypr.settings) cursor input misc monitor;
envd =
(optionals (config.nvidia.enable) [
"LIBVA_DRIVER_NAME, nvidia"
"NVD_BACKEND, direct"
"XDG_SESSION_TYPE, wayland"
"GBM_BACKEND, nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
])
++ [
"XCURSOR_SIZE,24"
];
general.border_size = 0;
decoration = {
blur.enabled = false;
drop_shadow = false;
};
exec-once = [
"hyprctl setcursor Dracula-cursors 24"
setupMonitors
"astal -b greeter &> /tmp/astal.log; hyprctl dispatch exit"
];
}
// devices;
};
};
}