nixos-configs/modules/greetd/default.nix

65 lines
1.6 KiB
Nix
Raw Normal View History

2023-11-22 15:33:16 -05:00
{
lib,
pkgs,
config,
hyprland,
...
2023-10-19 17:05:13 -04:00
}: let
regreetBin = "${lib.getExe config.programs.regreet.package}";
hyprBin = "${hyprland.packages.x86_64-linux.default}/bin";
gset = pkgs.gsettings-desktop-schemas;
css = pkgs.writeText "style.css" ''${builtins.readFile ./style.css}'';
hyprConf = pkgs.writeText "greetd-hypr-config" ''
exec-once = swww init --no-cache && swww img -t none ${pkgs.dracula-theme}/wallpapers/waves.png
${builtins.readFile ./hyprland.conf}
# 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
exec-once = ${regreetBin} -s ${css}; ${hyprBin}/hyprctl dispatch exit
2023-10-19 17:05:13 -04:00
'';
in {
users.users.greeter = {
packages = with pkgs; [
dracula-theme
flat-remix-icon-theme
swww
gtk3
glib
squeekboard
];
};
2023-10-19 17:05:13 -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 = {
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;
}