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

with lib;

let
  cfg = config.services.zerotierone;
in
{
  options.services.zerotierone.enable = mkEnableOption "ZeroTierOne";
  
  config = mkIf cfg.enable {
    systemd.services.zerotierone = {
      description = "ZeroTierOne";
      path = [ pkgs.zerotierone ];
      after = [ "network.target" ];
      wantedBy = [ "multi-user.target" ];
      preStart =
        ''
        mkdir -p /var/lib/zerotier-one
        chmod 700 /var/lib/zerotier-one
        chown -R root:root /var/lib/zerotier-one
        '';
      serviceConfig = {
        Type = "forking";
        User = "root";
        PIDFile = "/var/lib/zerotier-one/zerotier-one.pid";
        ExecStart = "${pkgs.zerotierone}/bin/zerotier-one -d";
      };
    };
  environment.systemPackages = [ pkgs.zerotierone ];
  };
}
<commit_msg>zerotierone: adopt systemd unit from upstream<commit_after>{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.zerotierone;
in
{
  options.services.zerotierone.enable = mkEnableOption "ZeroTierOne";
  
  config = mkIf cfg.enable {
    systemd.services.zerotierone = {
      description = "ZeroTierOne";
      path = [ pkgs.zerotierone ];
      after = [ "network.target" ];
      wantedBy = [ "multi-user.target" ];
      preStart =
        ''
        mkdir -p /var/lib/zerotier-one
        chmod 700 /var/lib/zerotier-one
        chown -R root:root /var/lib/zerotier-one
        '';
      serviceConfig = {
        ExecStart = "${pkgs.zerotierone}/bin/zerotier-one";
        Restart = "always";
        KillMode = "process";
      };
    };
  environment.systemPackages = [ pkgs.zerotierone ];
  };
}

{'fraction_non_alphanumeric': 0.14173703256936068, 'fraction_numerical': 0.0036188178528347406, 'mean_word_length': 2.240234375, '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': '1881778', 'n_tokens_mistral': 597, 'n_tokens_neox': 579, 'n_words': 98}