<commit_before>{ config, pkgs, lib, ... }:
{
  system.activationScripts.buildSigningKeys = ''
    if [[ ! -f /etc/nix/signing-key.sec ]]; then
      mkdir -p /etc/nix
      ${pkgs.openssh}/bin/ssh-keygen -b 4096 -N "" -f /etc/nix/signing-key.sec
      rm /etc/nix/signing-key.sec.pub
      ${pkgs.openssl}/bin/openssl rsa -in /etc/nix/signing-key.sec -pubout > /etc/nix/signing-key.pub
      chmod a-rwx,g+r /etc/nix/signing-key.*
      chown nobody:users /etc/nix/signing-key.*
    fi
  '';
}
<commit_msg>signing-keys: run after users; this activation script used to fail on boot every time<commit_after>{ config, pkgs, lib, ... }:
{
  system.activationScripts.buildSigningKeys = lib.stringAfter ["users"] ''
    if [[ ! -f /etc/nix/signing-key.sec ]]; then
      mkdir -p /etc/nix
      # ssh-keygen needs users to exist
      ${pkgs.openssh}/bin/ssh-keygen -b 4096 -N "" -f /etc/nix/signing-key.sec
      rm -f /etc/nix/signing-key.sec.pub
      ${pkgs.openssl}/bin/openssl rsa -in /etc/nix/signing-key.sec -pubout > /etc/nix/signing-key.pub
      chmod a-rwx,g+r /etc/nix/signing-key.*
      chown nobody:users /etc/nix/signing-key.*
    fi
  '';
}

{'fraction_non_alphanumeric': 0.17432784041630528, 'fraction_numerical': 0.006938421509106678, 'mean_word_length': 2.444776119402985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4189846', 'n_tokens_mistral': 482, 'n_tokens_neox': 448, 'n_words': 87}