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

51 lines
887 B
Nix
Raw Normal View History

{
config,
pkgs,
...
}: let
cfg = config.roles.desktop;
2024-06-24 12:30:49 -04:00
hyprland =
config
.home-manager
.users
.${cfg.user}
2024-06-24 12:30:49 -04:00
.wayland
.windowManager
.hyprland
.finalPackage;
cmd = toString (pkgs.writeShellScript "hyprland-wrapper" ''
trap 'systemctl --user stop hyprland-session.target; sleep 1' EXIT
exec Hyprland >/dev/null
'');
2023-10-19 17:05:13 -04:00
in {
imports = [
2024-07-25 23:24:19 -04:00
./ags
./hyprland.nix
];
2023-10-19 17:05:13 -04:00
services = {
displayManager.sessionPackages = [hyprland];
greetd = {
enable = true;
settings = {
default_session = {
command = cmd;
user = "greeter";
};
initial_session = {
command = cmd;
user = cfg.user;
};
2023-10-19 17:05:13 -04:00
};
};
};
# unlock GPG keyring on login
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
}