<commit_before>{
  network.description = "Piwik";

  resources = {
    gceNetworks.piwik-net = {
      addressRange = "10.0.0.0/24";
      firewall.allow-http.allowed.tcp = [ 80 443 ];
    };

    gceStaticIPs.public-ip.region = "northamerica-northeast1";
  };

  piwik = { resources, pkgs, ...}: {
    networking = {
      hostName = "piwik.pierebeaucamp.com";
      firewall.allowedTCPPorts = [ 80 443 ];
    };

    deployment = {
      targetEnv = "gce";
      gce = {
        region = "northamerica-northeast1-b";
        instanceType = "f1-micro";
        network = resources.gceNetworks.piwik-net;
        ipAddress = resources.gceStaticIPs.public-ip;
      };
    };

    services = {
      nginx.enable = true;

      piwik = {
        enable = true;
        nginx.default = true;
      };

      mysql = {
        enable = true;
        package = pkgs.mariadb;
        initialScript = pkgs.writeText "piwikInit.sql" ''
          INSTALL PLUGIN unix_socket SONAME 'auth_socket';<commit_msg>Fixed typo in Piwik setup<commit_after>{
  network.description = "Piwik";

  resources = {
    gceNetworks.piwik-net = {
      addressRange = "10.0.0.0/24";
      firewall.allow-http.allowed.tcp = [ 80 443 ];
    };

    gceStaticIPs.public-ip.region = "northamerica-northeast1";
  };

  piwik = { resources, pkgs, ...}: {
    networking = {
      hostName = "pierrebeaucamp.com";
      firewall.allowedTCPPorts = [ 80 443 ];
    };

    deployment = {
      targetEnv = "gce";
      gce = {
        region = "northamerica-northeast1-b";
        instanceType = "f1-micro";
        network = resources.gceNetworks.piwik-net;
        ipAddress = resources.gceStaticIPs.public-ip;
      };
    };

    services = {
      nginx.enable = true;

      piwik = {
        enable = true;
        nginx.default = true;
      };

      mysql = {
        enable = true;
        package = pkgs.mariadb;
        initialScript = pkgs.writeText "piwikInit.sql" ''
          INSTALL PLUGIN unix_socket SONAME 'auth_socket';
{'fraction_non_alphanumeric': 0.13117206982543642, 'fraction_numerical': 0.0199501246882793, 'mean_word_length': 2.012012012012012, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3470940', 'n_tokens_mistral': 735, 'n_tokens_neox': 678, 'n_words': 111}