2023-10-19 17:05:13 -04:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, config
|
2023-10-19 19:36:47 -04:00
|
|
|
, 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
|
|
|
|
|
|
|
paperConf = pkgs.writeText "hyprpaper.conf" ''
|
|
|
|
preload = ${pkgs.dracula-theme}/wallpapers/waves.png
|
|
|
|
wallpaper = eDP-1, ${pkgs.dracula-theme}/wallpapers/waves.png
|
|
|
|
'';
|
|
|
|
|
|
|
|
hyprConf = pkgs.writeText "greetd-hypr-config" ''
|
|
|
|
exec-once = hyprpaper --config ${paperConf}
|
|
|
|
|
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
|
|
|
|
hyprpaper
|
|
|
|
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;
|
|
|
|
}
|