<commit_before>{pkgs, config, ...}:

with pkgs.lib;

let

  dmcfg = config.services.xserver.displayManager;
  cfg = dmcfg.slim;

  slimConfig = pkgs.writeText "slim.cfg"
    ''
      xauth_path ${dmcfg.xauthBin}
      default_xserver ${dmcfg.xserverBin}
      xserver_arguments ${dmcfg.xserverArgs}
      sessions ${pkgs.lib.concatStringsSep "," (dmcfg.session.names ++ ["custom"])}
      login_cmd exec ${pkgs.stdenv.shell}/bin/sh ${dmcfg.session.script} "%session"
      halt_cmd ${config.system.build.upstart}/sbin/shutdown -h now
      reboot_cmd ${config.system.build.upstart}/sbin/shutdown -r now
      ${if cfg.defaultUser != "" then "default_user " + cfg.defaultUser else ""}
      ${if cfg.hideCursor then "hidecursor true" else ""}
    '';

  # Unpack the SLiM theme, or use the default.
  slimThemesDir =
    let
      unpackedTheme = pkgs.stdenv.mkDerivation {
        name = "slim-theme";
        buildCommand = ''<commit_msg>Fixing extra /bin/sh in the shell - noticed by <NAME><commit_after>{pkgs, config, ...}:

with pkgs.lib;

let

  dmcfg = config.services.xserver.displayManager;
  cfg = dmcfg.slim;

  slimConfig = pkgs.writeText "slim.cfg"
    ''
      xauth_path ${dmcfg.xauthBin}
      default_xserver ${dmcfg.xserverBin}
      xserver_arguments ${dmcfg.xserverArgs}
      sessions ${pkgs.lib.concatStringsSep "," (dmcfg.session.names ++ ["custom"])}
      login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
      halt_cmd ${config.system.build.upstart}/sbin/shutdown -h now
      reboot_cmd ${config.system.build.upstart}/sbin/shutdown -r now
      ${if cfg.defaultUser != "" then "default_user " + cfg.defaultUser else ""}
      ${if cfg.hideCursor then "hidecursor true" else ""}
    '';

  # Unpack the SLiM theme, or use the default.
  slimThemesDir =
    let
      unpackedTheme = pkgs.stdenv.mkDerivation {
        name = "slim-theme";
        buildCommand = ''
{'fraction_non_alphanumeric': 0.13971742543171115, 'fraction_numerical': 0.0, 'mean_word_length': 3.1118279569892473, 'pattern_counts': {'":': 0, '<': 4, '<?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': '816884', 'n_tokens_mistral': 664, 'n_tokens_neox': 653, 'n_words': 132}