anchor.diff:            Window manager start command. DEPRECATED: Use
             <varname>xsession.windowManager.command</varname> instead.
           '';
  +      };
  +
  +      profileExtra = mkOption {
  +        type = types.lines;
  +        default = "";
  +        description = "Extra shell commands to run before session start.";
         };
   
         initExtra = mkOption {
  
positive.code:         };
        };
  
        home.file.".xsession" = {
          mode = "555";
          text = ''
            if [[ -e "$HOME/.profile" ]]; then
              . "$HOME/.profile"
            fi
  
            # If there are any running services from a previous session.
            systemctl --user stop graphical-session.target graphical-session-pre.target
  
            systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS
  
negative.code:           systemctl --user import-environment XDG_DATA_DIRS
            systemctl --user import-environment XDG_RUNTIME_DIR
            systemctl --user import-environment XDG_SESSION_ID
  
            ${cfg.profileExtra}
  
            export HM_XPROFILE_SOURCED=1
        '';
  
        home.file.".xsession" = {
          mode = "555";
          text = ''
            if [[ ! -v HM_XPROFILE_SOURCED ]]; then
              . ~/.xprofile
            fi
            unset HM_XPROFILE_SOURCED
  
            systemctl --user start hm-graphical-session.target
  
  