{ pkgs, ... }: { environment = { enableAllTerminfo = true; systemPackages = let yazi-picker = pkgs.writeShellScriptBin "yazi-picker" '' #!/usr/bin/env bash paths=$(yazi "$2" --chooser-file=/dev/stdout | while read -r; do printf "%q " "$REPLY"; done) if [[ -n "$paths" ]]; then zellij action toggle-floating-panes zellij action write 27 # send key zellij action write-chars ":$1 $paths" zellij action write 13 # send key else zellij action toggle-floating-panes fi ''; lazygit-root = pkgs.writeShellScriptBin "lazygit-root" '' #!/usr/bin/env bash git_root=$(git rev-parse --show-toplevel 2>/dev/null) if [[ -z "$git_root" ]]; then echo "Not in a git repository" exit 1 fi cd "$git_root" && lazygit ''; in builtins.attrValues { inherit (pkgs) git grim pijul sshfs tomb just virt-manager imagemagick ; # Add your custom scripts to the attribute set inherit yazi-picker lazygit-root; }; variables = { VIDEO_PLAYER = "mpv"; EDITOR = "hx"; TERM = "ghostty"; NIXPKGS_ALLOW_INSECURE = "1"; NIXPKGS_ALLOW_UNFREE = "1"; GTK_THEME = "catppuccin-macchiato-mauve-compact"; # ANTHROPIC_API_KEY = config.sops.secrets.claude-api-key.path; }; }; }