<commit_before>{ at, config }:

let uid = (import ../system/ids.nix).uids.atd;
    gid = (import ../system/ids.nix).gids.atd;
in
{
  name = "atd";
  
  users = [
    { name = "atd";
      inherit uid;
      description = "atd user";
      home = "/var/empty";
    }
  ];

  groups = [
    { name = "atd";
      inherit gid;
    }
  ];

  job = ''
description "at daemon (atd)"

start on startup
stop on shutdown

start script
   # Snippets taken and adapted from the original `install' rule of
   # the makefile.

   # We assume these values are those actually used in Nixpkgs for
   # `at'.
   spooldir=/var/spool/atspool
   jobdir=/var/spool/atjobs
   etcdir=/etc/at

   for dir in "$spooldir" "$jobdir" "$etcdir"
   do
     if [ ! -d "$dir" ]
     then
         mkdir "$dir" && chown atd:atd "$dir"
     fi
   done
   chmod 1770 "$spooldir" "$jobdir"
   ${if config.allowEveryone then ''chmod a+rwxt "$spooldir" "$jobdir" '' else ""}
   if [ ! -f "$etcdir"/at.deny ]
   then
       touch "$etcdir"/at.deny && \
       chown root:atd "$etcdir"/at.deny && \
       chmod 640 "$etcdir"/at.deny
   fi
   if [ ! -f "$jobdir"/.SEQ ]
   then
       touch "$jobdir"/.SEQ && \
       chown atd:atd "$jobdir"/.SEQ && \
       chmod 600 "$jobdir"/.SEQ
   fi
end script

respawn ${at}/sbin/atd
'';
  
}
<commit_msg>* Creating /var/spool/whatever fails if /var/spool doesn't exist.<commit_after>{ at, config }:

let uid = (import ../system/ids.nix).uids.atd;
    gid = (import ../system/ids.nix).gids.atd;
in
{
  name = "atd";
  
  users = [
    { name = "atd";
      inherit uid;
      description = "atd user";
      home = "/var/empty";
    }
  ];

  groups = [
    { name = "atd";
      inherit gid;
    }
  ];

  job = ''
description "at daemon (atd)"

start on startup
stop on shutdown

start script
   # Snippets taken and adapted from the original `install' rule of
   # the makefile.

   # We assume these values are those actually used in Nixpkgs for
   # `at'.
   spooldir=/var/spool/atspool
   jobdir=/var/spool/atjobs
   etcdir=/etc/at

   for dir in "$spooldir" "$jobdir" "$etcdir"
   do
     if [ ! -d "$dir" ]
     then
         mkdir -p "$dir" && chown atd:atd "$dir"
     fi
   done
   chmod 1770 "$spooldir" "$jobdir"
   ${if config.allowEveryone then ''chmod a+rwxt "$spooldir" "$jobdir" '' else ""}
   if [ ! -f "$etcdir"/at.deny ]
   then
       touch "$etcdir"/at.deny && \
       chown root:atd "$etcdir"/at.deny && \
       chmod 640 "$etcdir"/at.deny
   fi
   if [ ! -f "$jobdir"/.SEQ ]
   then
       touch "$jobdir"/.SEQ && \
       chown atd:atd "$jobdir"/.SEQ && \
       chmod 600 "$jobdir"/.SEQ
   fi
end script

respawn ${at}/sbin/atd
'';
  
}

{'fraction_non_alphanumeric': 0.16310461192350956, 'fraction_numerical': 0.0074990626171728535, 'mean_word_length': 2.1388235294117646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '195213', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1026, 'n_words': 264}