<commit_before># This module declares the options to define a *display manager*, the
# program responsible for handling X logins (such as xdm, kdm, gdb, or
# SLiM).  The display manager allows the user to select a *session
# type*.  When the user logs in, the display manager starts the
# *session script* ("xsession" below) to launch the selected session
# type.  The session type defines two things: the *desktop manager*
# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
# manager* (e.g. kwin or twm).

{ config, pkgs, ... }:

with pkgs.lib;

let

  cfg = config.services.xserver;
  xorg = pkgs.xorg;

  vaapiDrivers = pkgs.buildEnv {
    name = "vaapi-drivers";
    paths = cfg.vaapiDrivers;
    pathsToLink = "/lib/dri";

    # To admit zero-length 'paths'
    postBuild = "
      ensureDir $out/lib/dri
    ";
  };

  # file provided by services.xserver.displayManager.session.script
  xsession = wm: dm: pkgs.writeScript "xsession"
    ''<commit_msg>Changing ensureDir -> mkdir -p<commit_after># This module declares the options to define a *display manager*, the
# program responsible for handling X logins (such as xdm, kdm, gdb, or
# SLiM).  The display manager allows the user to select a *session
# type*.  When the user logs in, the display manager starts the
# *session script* ("xsession" below) to launch the selected session
# type.  The session type defines two things: the *desktop manager*
# (e.g., KDE, Gnome or a plain xterm), and optionally the *window
# manager* (e.g. kwin or twm).

{ config, pkgs, ... }:

with pkgs.lib;

let

  cfg = config.services.xserver;
  xorg = pkgs.xorg;

  vaapiDrivers = pkgs.buildEnv {
    name = "vaapi-drivers";
    paths = cfg.vaapiDrivers;
    pathsToLink = "/lib/dri";

    # To admit zero-length 'paths'
    postBuild = "
      mkdir -p $out/lib/dri
    ";
  };

  # file provided by services.xserver.displayManager.session.script
  xsession = wm: dm: pkgs.writeScript "xsession"
    ''
{'fraction_non_alphanumeric': 0.11213047910295616, 'fraction_numerical': 0.0, 'mean_word_length': 3.3333333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6432974', 'n_tokens_mistral': 673, 'n_tokens_neox': 635, 'n_words': 232}