snowflake/home/wayland/services/greetd.nix

80 lines
2 KiB
Nix
Raw Permalink Normal View History

2024-04-17 20:29:26 -04:00
{
pkgs,
inputs,
lib,
...
}: let
hyprlandGreetdConf = pkgs.writeText "hyprland-greetd-conf.conf" ''
monitor = HDMI-A-1,disable
monitor = DP-2,disable
monitor = DP-1,2560x1440@144, 0x0, auto
2024-04-17 20:29:26 -04:00
monitor = DP-3,disable
env = XDG_SESSION_TYPE,wayland
exec-once = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
exec-once = ${lib.getExe pkgs.greetd.regreet}; hyprctl dispatch exit
exec-once = systemctl --user restart xdg-desktop-portal xdg-desktop-portal-hyprland
windowrulev2 = fullscreen, title:^regreet$
windowrulev2 = move 0 0, title:^regreet$
$mainMod = SUPER
bind = $mainMod, Q, exec, reboot
2024-04-22 16:16:03 -04:00
bind = $mainMod, Return, exec, ${lib.getExe pkgs.greetd.regreet}
2024-04-17 20:29:26 -04:00
input {
kb_layout = us
follow_mouse = 1
sensitivity = -0.5
force_no_accel = true
}
animations {
enabled = false
first_launch_animation = false
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
'';
in {
2024-01-22 03:48:37 -05:00
services.greetd = {
enable = true;
settings = rec {
initial_session = {
2024-04-17 20:29:26 -04:00
command = "${lib.getExe inputs.hyprland.packages.${pkgs.system}.default} --config ${hyprlandGreetdConf}";
user = "greeter";
2024-01-22 03:48:37 -05:00
};
default_session = initial_session;
};
};
2024-04-17 20:29:26 -04:00
programs.regreet = {
enable = true;
settings = {
background.path = "/etc/greetd/frieren.png";
env = {
SESSION_DIRS = "/etc/greetd/environments";
};
terminal = {
vt = 1;
};
commands = {
reboot = ["systemctl" "reboot"];
poweroff = ["systemctl" "poweroff"];
};
GTK = {
application_prefer_dark_theme = true;
theme_name = "Tokyonight-Dark-BL";
icon_theme_name = "Papirus-Dark";
cursor_theme_name = "Bibata-Modern-Classic";
font_name = "Noto Sans 11";
};
};
};
2024-01-22 03:48:37 -05:00
}