nixnew/modules/user/modules/greetd/default.nix

55 lines
1.4 KiB
Nix

{ inputs, system, config, lib, pkgs, ... }: let
hyprlandPackage = config.home-manager.users.${config.main-user}.wayland.windowManager.hyprland.package;
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
# for some reason pkill is way faster than dispatching exit, to the point greetd thinks the greeter died.
exec-once = quickshell -c greeter >& qslog.txt && pkill Hyprland
input {
kb_layout = us
sensitivity = 0
follow_mouse = 1
# mouse_refocus = false - #6393
accel_profile = flat
}
decoration {
blur {
enabled = no
}
}
animations {
enabled = no
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
background_color = 0x000000
key_press_enables_dpms = true
mouse_move_enables_dpms = true
}
${config.hyprland-session.extraConfigStatic}
'';
in {
services.greetd = {
enable = true;
restart = false;
settings.default_session.command = "${lib.getExe hyprlandPackage} -c ${hyprlandConfig}";
};
# needed for hyprland cache dir
users.users.greeter = {
home = "/home/greeter";
createHome = true;
};
home-manager.users.greeter = {
home.stateVersion = config.system.stateVersion;
imports = [
../../../theme/home.nix # also fixes cursor
../quickshell # set up quickshell manifest and such
];
};
}