niksos/hosts/niks/greetd.nix

34 lines
880 B
Nix
Raw Normal View History

2023-07-30 23:52:15 +02:00
{
2023-09-08 16:10:15 +02:00
inputs,
2023-07-30 23:52:15 +02:00
pkgs,
2023-09-08 16:10:15 +02:00
username,
2023-07-30 23:52:15 +02:00
...
}: let
greeter = "gtkgreet";
2023-09-08 16:10:15 +02:00
hyprlandConfig = pkgs.writeText "greetd-hyprland-config" ''
workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false
2023-07-30 23:52:15 +02:00
2023-09-08 16:10:15 +02:00
exec-once=systemctl --user stop waybar.service
exec-once=[workspace 1;fullscreen;noanim] ${pkgs.greetd.${greeter}}/bin/${greeter} -l; hyprctl dispatch exit
exec-once=hyprctl dispatch focuswindow gtkgreet
2023-07-30 23:52:15 +02:00
'';
in {
services.greetd = {
enable = true;
2023-08-11 00:00:19 +02:00
settings.default_session = {
2023-09-08 16:10:15 +02:00
command = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland --config ${hyprlandConfig}";
user = username;
2023-07-30 23:52:15 +02:00
};
};
environment.etc = {
"greetd/environments".text = ''
Hyprland
2023-09-08 16:10:15 +02:00
sway
2023-07-30 23:52:15 +02:00
zsh
shutdown now
'';
};
}