nixos-configs/modules/desktop/display-manager/default.nix
matt1432 dc1b120c50
All checks were successful
Discord / discord commits (push) Has been skipped
feat(desktop): visually cleanup boot sequence
2024-07-10 20:12:46 -04:00

50 lines
893 B
Nix

{
config,
pkgs,
...
}: let
cfg = config.roles.desktop;
hyprland =
config
.home-manager
.users
.${cfg.user}
.wayland
.windowManager
.hyprland
.finalPackage;
cmd = toString (pkgs.writeShellScript "hyprland-wrapper" ''
trap 'systemctl --user stop hyprland-session.target; sleep 1' EXIT
exec Hyprland >/dev/null
'');
in {
imports = [
./astal.nix
./hyprland.nix
];
services = {
displayManager.sessionPackages = [hyprland];
greetd = {
enable = true;
settings = {
default_session = {
command = cmd;
user = "greeter";
};
initial_session = {
command = cmd;
user = cfg.user;
};
};
};
};
# unlock GPG keyring on login
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
}