{ pkgs
, lib
, config
, ... }: with lib; let
  cfg = config.global.gpu;
in mkIf (cfg.enable && cfg.session) {
  programs.regreet = {
    enable = mkDefault true;
    cageArgs = [ "-s" "-d" "-m" "last" ];
    settings = {
      background.path = ../../share/54345906_p0.jpg;
      background.fit = "Fill";
      GTK = {
        application_prefer_dark_theme = true;
        cursor_theme_name = "Bibata-Modern-Classic";
        icon_theme_name = "Papirus-Dark";
        theme_name = "WhiteSur-Dark";
      };
    };
  };

  environment.persistence."/nix/persist/fhs".directories = [ "/var/cache/regreet" ];
}
