{ pkgs, username, lib, ... }: {
    /*services.greetd = {
	enable = true;
	settings = {
		default_session = {
			user = username;
			command = "$HOME/.wayland-session";
		};
	};
    };*/

    services.displayManager = {
        sessionPackages = [ pkgs.hyprland ];
    };

    environment.etc= {
        "greetd/background.png".source = ../../wallpapers/lucy_with_cat.png;
        "greetd/environments".text = ''
        hyprland
        fish
        '';
    };

    programs.regreet = {
        enable = true;
        #cageArgs = ["-s" "-m" "last" ];
        #settings = ./regreet.toml;
        settings = {
            background = { 
                path = "/etc/greetd/background.png";
                fit = "Fill";
            };

            env.SESSION_DIRS = "$HOME/.wayland-session";

            GTK = {
                application_prefer_dark_theme = true;
                cursor_theme_name = "Adwaita";
                font_name = lib.mkForce "FiraCodeNerdFontPropo 12";
                icon_theme_name = lib.mkForce "materialdesignicons";
                theme_name = "Adwaita";
            };

            commands = {
                reboot = ["systemctl" "reboot"];
                poweroff = ["systemctl" "poweroff"];
                x11_prefix = [ "startx" "/usr/bin/env" ];
            };

            appearance = {
                greeting_msg = "Hey there, Master!";
            };

            widget.clock = {
                format = "%A %d.%m.%Y %T";
                resolution = "500ms";
                timezone = "Europe/Berlin";
                label_width = 150;
            };
        };
    };
}
