{ config, profile, pkgs, lib, ... }: let xdg = { state = config.xdg.state.directory; data = config.xdg.data.directory; cache = config.xdg.cache.directory; config = config.xdg.config.directory; }; in { xdg.config.files."zsh/environment" = { executable = true; text = '' export EDITOR="hx" export COLORTERM="truecolor" export XDG_DATA_HOME="${xdg.data}" export XDG_STATE_HOME="${xdg.state}" export XDG_CONFIG_HOME="${xdg.config}" export XDG_CACHE_HOME="${xdg.cache}" export PATH="$PATH:${xdg.state}/nix/profile/bin" ${lib.optionalString (profile == "darwin") '' PATH="$PATH:/run/current-system/sw/bin:/opt/homebrew/bin" ''} ${lib.optionalString (profile == "wsl") '' hash -d host=/mnt/c/Users/Hanna ''} export CLAUDE_CONFIG_DIR="${xdg.config}/claude" export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${xdg.config}/java" export NPM_CONFIG_USERCONFIG="${xdg.config}/npm/npmrc" export NODE_REPL_HISTORY="${xdg.state}/node_history" export SQLITE_HISTORY="${xdg.state}/sqlite_history" export LESSHISTFILE="${xdg.state}/less_history" export PI_CODING_AGENT_DIR="${xdg.data}/pi" export CUDA_CACHE_PATH="${xdg.cache}/cuda" export RUSTUP_HOME="${xdg.data}/rustup" export CARGO_HOME="${xdg.data}/cargo" export GNUPGHOME="${xdg.data}/gnupg" export GOPATH="${xdg.data}/go" ${if profile != "darwin" then '' alias ls="${pkgs.lsr}/bin/lsr --hyperlinks=never" alias ll="${pkgs.lsr}/bin/lsr -l --hyperlinks=never" alias lla="${pkgs.lsr}/bin/lsr -la --hyperlinks=never" '' else '' alias ls="${pkgs.lsd}/bin/lsd --hyperlink never" alias ll="${pkgs.lsd}/bin/lsd -l --hyperlink never" alias lla="${pkgs.lsd}/bin/lsd -la --hyperlink never" ''} alias cat="${pkgs.bat}/bin/bat" alias gri="${pkgs.git}/bin/git rebase --interactive" alias gcr="${pkgs.git}/bin/git clone --recursive" alias gpa="${pkgs.git}/bin/git push --atomic" alias gco="${pkgs.git}/bin/git commit" alias grt="${pkgs.git}/bin/git remote" alias grb="${pkgs.git}/bin/git rebase" alias gst="${pkgs.git}/bin/git stash" alias gcl="${pkgs.git}/bin/git clone" alias grs="${pkgs.git}/bin/git reset" alias gpu="${pkgs.git}/bin/git push" alias gpl="${pkgs.git}/bin/git pull" alias gin="${pkgs.git}/bin/git init" alias gtg="${pkgs.git}/bin/git tag" setopt SHARE_HISTORY mkdir -p "${xdg.state}/zsh" HISTFILE="${xdg.state}/zsh/history" HISTSIZE=10000 SAVEHIST=1000 ''; }; }