2023-11-22 15:33:16 -05:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
hyprland,
|
|
|
|
...
|
2023-10-19 17:05:13 -04:00
|
|
|
}: let
|
2023-10-19 19:36:47 -04:00
|
|
|
regreetBin = "${lib.getExe config.programs.regreet.package}";
|
|
|
|
hyprBin = "${hyprland.packages.x86_64-linux.default}/bin";
|
|
|
|
gset = pkgs.gsettings-desktop-schemas;
|
|
|
|
|
2023-10-19 22:32:44 -04:00
|
|
|
css = pkgs.writeText "style.css" ''${builtins.readFile ./style.css}'';
|
2023-10-19 19:36:47 -04:00
|
|
|
|
|
|
|
hyprConf = pkgs.writeText "greetd-hypr-config" ''
|
2023-11-03 23:05:46 -04:00
|
|
|
exec-once = swww init --no-cache && swww img -t none ${pkgs.dracula-theme}/wallpapers/waves.png
|
2023-10-19 19:36:47 -04:00
|
|
|
|
2023-10-19 22:32:44 -04:00
|
|
|
${builtins.readFile ./hyprland.conf}
|
2023-10-19 19:36:47 -04:00
|
|
|
|
|
|
|
# FIXME: kb doesn't work
|
|
|
|
env = XDG_DATA_DIRS, ${gset}/share/gsettings-schemas/${gset.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
|
|
|
|
exec-once = squeekboard
|
|
|
|
exec-once = gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
|
2023-10-19 17:05:13 -04:00
|
|
|
|
2023-10-19 19:36:47 -04:00
|
|
|
exec-once = ${regreetBin} -s ${css}; ${hyprBin}/hyprctl dispatch exit
|
2023-10-19 17:05:13 -04:00
|
|
|
'';
|
|
|
|
in {
|
2023-10-19 19:36:47 -04:00
|
|
|
users.users.greeter = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
dracula-theme
|
|
|
|
flat-remix-icon-theme
|
2023-11-03 23:05:46 -04:00
|
|
|
swww
|
2023-10-19 19:36:47 -04:00
|
|
|
gtk3
|
|
|
|
glib
|
|
|
|
squeekboard
|
|
|
|
];
|
|
|
|
};
|
2023-10-19 17:05:13 -04:00
|
|
|
|
2023-10-19 19:36:47 -04:00
|
|
|
# See overlay
|
2023-10-19 17:05:13 -04:00
|
|
|
programs.regreet = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
GTK = {
|
|
|
|
cursor_theme_name = "Dracula-cursors";
|
|
|
|
font_name = "Sans Serif";
|
|
|
|
icon_theme_name = "Flat-Remix-Violet-Dark";
|
|
|
|
theme_name = "Dracula";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.greetd = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
2023-10-19 19:36:47 -04:00
|
|
|
command = "${hyprBin}/Hyprland --config ${hyprConf}";
|
2023-10-19 17:05:13 -04:00
|
|
|
user = "greeter";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# unlock GPG keyring on login
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
security.pam.services.greetd.enableGnomeKeyring = true;
|
|
|
|
}
|