nixos-configs/nixosModules/desktop/manager/hyprland.nix
matt1432 85348d1a6c
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: use helper funcs for hyprland conf
2024-11-20 20:12:24 -05:00

77 lines
1.6 KiB
Nix

self: {
config,
lib,
pkgs,
...
}: {
config = let
inherit (lib) optionals;
inherit (self.lib.hypr) mkAnimation;
inherit (import ./setupMonitors.nix {inherit config pkgs;}) setupMonitors;
cfg = config.roles.desktop;
# Nix stuff
cfgHypr =
config
.home-manager
.users
.${cfg.user}
.wayland
.windowManager
.hyprland;
in {
home-manager.users.greeter = {
imports = [
(import ../theme self)
];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
package = cfgHypr.finalPackage;
settings = {
inherit (cfgHypr.settings) cursor device 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"
];
general.border_size = 0;
decoration = {
blur.enabled = false;
shadow.enabled = false;
};
animation = map mkAnimation [
{
name = "fadeLayersIn";
enable = false;
}
{
name = "layers";
duration = 4;
style = "popin";
}
];
exec-once = [
setupMonitors
"agsGreeter &> /tmp/ags-greetd.log; hyprctl dispatch exit"
];
};
};
};
};
# For accurate stack trace
_file = ./hyprland.nix;
}