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

let
  user = builtins.getEnv "USER";
  homeDir = builtins.getEnv "HOME";
  isMacOS = builtins.currentSystem == "x86_64-darwin" || builtins.currentSystem == "aarch64-darwin";
  link = config.lib.file.mkOutOfStoreSymlink;

  # cross-platform packages
  packages = with pkgs; [
    # things fail to build without these
    automake
    autoconf
    autoconf-archive
    pkg-config
    gnumake
    cmake
    libtool
    clang

    # utils
    bat
    zsh
    jq
    yq
    tree
    htop
    fzf
    watch
    ripgrep
    silver-searcher
    git
    gnupg
    nettools
    gh
    nixpkgs-fmt
    ffmpeg
    # mkdocs breaking for whatever reason

    # internet
    youtube-dl
    wget
    axel
    curl
    speedtest-cli

    # programming/sdks
    python310
    ruby
    go_1_18
    nodejs-18_x
    yarn
    jdk
    rustup
    dotnet-sdk

    # container/devops
    docker-client
    docker-compose_2
    docker-buildx
    docker-credential-gcr
    docker-credential-helpers
    buildkit
    kubectl
    kubectx
    kubernetes-helm
    kind
    terraform
    pulumi-bin
    vault
    packer
    buildpack
    google-cloud-sdk

    # virtualization
    vagrant
    qemu
  ];

  # macOS specific packages
  macosPackages = with pkgs; [
    mas
  ];

  # Linux specific packages
  linuxPackages = with pkgs; [
    coreutils
  ];

  customPackages = [
    _1password
  ];

  # 1password fix
  _1p = rec {
    version = "2.4.1";
    platform = rec {
      aarch64-darwin = { name = "apple_universal"; sha256 = "sha256:0456w2fjjqmq5l3ci95pqyp17n83yddhl16v5s2csvghhx1ynfgw"; ext = "pkg"; };
      x86_64-darwin = aarch64-darwin;
      aarch64-linux = { name = "linux_arm64"; sha256 = "sha256:0456w2fjjqmq5l3ci95pqyp17n83yddhl16v5s2csvghhx1ynfgw"; ext = "zip"; };
      x86_64-linux = { name = "linux_amd64"; sha256 = "sha256:0456w2fjjqmq5l3ci95pqyp17n83yddhl16v5s2csvghhx1ynfgw"; ext = "zip"; };
    }.${builtins.currentSystem};
    url = "https://cache.agilebits.com/dist/1P/op2/pkg/v${version}/op_${platform.name}_v${version}.${platform.ext}";
    src =
      if isMacOS then builtins.fetchurl { url = url; sha256 = platform.sha256; }
      else builtins.fetchzip { url = url; sha256 = platform.sha256; stripRoot = false; };
  };
  _1password = pkgs._1password.overrideAttrs (old: {
    src = _1p.src;
  });

  # zsh theme
  zshThemeFile = builtins.readFile "${homeDir}/dotfiles/zsh/abiola.zsh-theme";
  customOhMyZshDir = pkgs.stdenv.mkDerivation {
    name = "oh-my-zsh-custom-dir";
    src = builtins.toFile "abiola.zsh-theme" "${zshThemeFile}";
    phases = [ "buildPhase" ];
    buildPhase = ''
      mkdir -p $out/themes
      cp $src $out/themes/abiola.zsh-theme
    '';<commit_msg>nix: fix 1password sha for linux amd64<commit_after>{ config, pkgs, lib, ... }:

let
  user = builtins.getEnv "USER";
  homeDir = builtins.getEnv "HOME";
  isMacOS = builtins.currentSystem == "x86_64-darwin" || builtins.currentSystem == "aarch64-darwin";
  link = config.lib.file.mkOutOfStoreSymlink;

  # cross-platform packages
  packages = with pkgs; [
    # things fail to build without these
    automake
    autoconf
    autoconf-archive
    pkg-config
    gnumake
    cmake
    libtool
    clang

    # utils
    bat
    zsh
    jq
    yq
    tree
    htop
    fzf
    watch
    ripgrep
    silver-searcher
    git
    gnupg
    nettools
    gh
    nixpkgs-fmt
    ffmpeg
    # mkdocs breaking for whatever reason

    # internet
    youtube-dl
    wget
    axel
    curl
    speedtest-cli

    # programming/sdks
    python310
    ruby
    go_1_18
    nodejs-18_x
    yarn
    jdk
    rustup
    dotnet-sdk

    # container/devops
    docker-client
    docker-compose_2
    docker-buildx
    docker-credential-gcr
    docker-credential-helpers
    buildkit
    kubectl
    kubectx
    kubernetes-helm
    kind
    terraform
    pulumi-bin
    vault
    packer
    buildpack
    google-cloud-sdk

    # virtualization
    vagrant
    qemu
  ];

  # macOS specific packages
  macosPackages = with pkgs; [
    mas
  ];

  # Linux specific packages
  linuxPackages = with pkgs; [
    coreutils
  ];

  customPackages = [
    _1password
  ];

  # 1password fix
  _1p = rec {
    version = "2.4.1";
    platform = rec {
      aarch64-darwin = { name = "apple_universal"; sha256 = "sha256:0456w2fjjqmq5l3ci95pqyp17n83yddhl16v5s2csvghhx1ynfgw"; ext = "pkg"; };
      x86_64-darwin = aarch64-darwin;
      aarch64-linux = { name = "linux_arm64"; sha256 = "sha256:0456w2fjjqmq5l3ci95pqyp17n83yddhl16v5s2csvghhx1ynfgw"; ext = "zip"; };
      x86_64-linux = { name = "linux_amd64"; sha256 = "sha256-axZ+XDIMJlAicnYTIXgcaoT+Zcg6xvHlchl/ng7V9GY="; ext = "zip"; };
    }.${builtins.currentSystem};
    url = "https://cache.agilebits.com/dist/1P/op2/pkg/v${version}/op_${platform.name}_v${version}.${platform.ext}";
    src =
      if isMacOS then builtins.fetchurl { url = url; sha256 = platform.sha256; }
      else pkgs.fetchzip { url = url; sha256 = platform.sha256; stripRoot = false; };
  };
  _1password = pkgs._1password.overrideAttrs (old: {
    src = _1p.src;
  });

  # zsh theme
  zshThemeFile = builtins.readFile "${homeDir}/dotfiles/zsh/abiola.zsh-theme";
  customOhMyZshDir = pkgs.stdenv.mkDerivation {
    name = "oh-my-zsh-custom-dir";
    src = builtins.toFile "abiola.zsh-theme" "${zshThemeFile}";
    phases = [ "buildPhase" ];
    buildPhase = ''
      mkdir -p $out/themes
      cp $src $out/themes/abiola.zsh-theme
    '';
{'fraction_non_alphanumeric': 0.1082219373741073, 'fraction_numerical': 0.04468046145394616, 'mean_word_length': 2.549057829759584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2426849', 'n_tokens_mistral': 2251, 'n_tokens_neox': 2077, 'n_words': 382}