anchor.diff:        for i in ${toString cfg.packages}; do
           for fn in $i/etc/systemd/${type}/* $i/lib/systemd/${type}/*; do
             if ! [[ "$fn" =~ .wants$ ]]; then
  -            ln -s $fn $out/
  +            if [[ -d "$fn" ]]; then
  +              targetDir="$out/$(basename "$fn")"
  +              mkdir -p "$targetDir"
  +              ${lndir} "$fn" "$targetDir"
  +            else
  +              ln -s $fn $out/
  +            fi
             fi
           done
         done
  
positive.code: 
  with lib;
  
  let cfg = config.systemd; in
  
  rec {
  
    shellEscape = s: (replaceChars [ "\\" ] [ "\\\\" ] s);
  
  
negative.code:           if [ "$(readlink -f $i/$fn)" = /dev/null ]; then
              ln -sfn /dev/null $out/$fn
            else
              mkdir -p $out/$fn.d
              ln -s $i/$fn $out/$fn.d/overrides.conf
            fi
         else
  