first attempt at changing the layout and using greetd

This commit is contained in:
Christoph Hollizeck 2024-06-04 22:49:53 +02:00
parent 29d67066a5
commit 4b3e844f56
No known key found for this signature in database
4 changed files with 97 additions and 6 deletions

View file

@ -0,0 +1,39 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.graphical-interface.display-manager.greetd;
hyperland = config.wyrdgard.graphical-interface.desktop-manager.hyperland;
hyprland-session = "${inputs.hyprland.packages.${pkgs.system}.hyperland}/share/wayland-sessions";
kde-session = "${inputs.plasma6.packages.${pkgs.system}.plasma6}/share/wayland-sessions";
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session";
command = if hyperland.enable then "${tuigreet} --sessions ${hyprland-session}" else "${tuigreet} --sessions ${kde-session}";
in
{
options.wyrdgard.graphical-interface.display-manager.greetd = with types; {
enable = mkEnableOption "Whether to enable a sddm";
};
config = mkIf cfg.enable {
services = {
xserver = enabled;
greetd = {
enable = true;
settings = {
default_session = {
command = command;
user = config.wyrdgard.user.name;
};
};
};
};
};
}