dotfiles/lib/shared/home-manager-packages.nix

91 lines
1.5 KiB
Nix
Raw Normal View History

2024-03-18 20:33:28 +00:00
{ inputs, pkgs, ... }:
2024-03-30 20:00:37 +00:00
let
php = pkgs.php82;
phpPackages = pkgs.php82Packages;
2024-06-15 11:17:07 +00:00
inherit (pkgs) writeShellScriptBin;
script-t = writeShellScriptBin "t" ''
# Credit to ThePrimeagen.
set -o nounset
set -o pipefail
if [[ $# -eq 1 ]]; then
selected=$1
else
# Get the session name from fuzzy-finding list of directories and generating a
# tmux-safe version.
items=$(find ~/Code/* ~/Code ~ ~/Documents /tmp \
-maxdepth 1 -mindepth 1 -type d \
! -name "*-old" \
! -name "*.old"
)
selected=$(echo "''${items}" | fzf)
fi
if [[ -z "''${selected}" ]]; then
exit 0
fi
session_name=$(basename "''${selected}" | sed 's/\./_/g')
session_path="''${selected}"
# Git worktrees.
if [[ -e "''${selected}/main" ]]; then
session_path="''${selected}/main"
fi
if tmux has-session -t "''${session_name}" 2> /dev/null; then
tmux attach -t "''${session_name}"
fi
tmux new-session -d -s "''${session_name}" -c "''${session_path}"
tmux switch-client -t "''${session_name}" || tmux attach -t "''${session_name}"
'';
in
with pkgs;
[
2024-06-15 11:17:07 +00:00
script-t
inputs.build-configs.packages.${pkgs.system}.default
2024-03-30 22:22:39 +00:00
awscli2
2024-02-27 18:33:03 +00:00
bitwarden-cli
2023-03-22 22:56:56 +00:00
bottom
2024-03-01 21:30:54 +00:00
cachix
2023-03-22 22:56:56 +00:00
ctop
delta
2023-06-28 19:49:08 +00:00
dog
2023-03-22 22:56:56 +00:00
doppler
entr
2023-06-28 19:49:08 +00:00
fd
2023-03-22 22:56:56 +00:00
file
gcc
gh
git
git-crypt
gnupg
2023-09-22 06:45:29 +00:00
go
2023-03-22 22:56:56 +00:00
htop
2023-06-28 19:49:08 +00:00
inotify-tools
2023-03-22 22:56:56 +00:00
jq
lua
mysql
2024-03-30 20:00:37 +00:00
php
phpPackages.composer
2023-03-22 22:56:56 +00:00
pv
2024-01-14 09:11:03 +00:00
rustywind
2023-03-22 22:56:56 +00:00
tldr
tree
2023-06-28 19:49:08 +00:00
tree-sitter
2023-03-22 22:56:56 +00:00
unzip
virtualenv
wget
xcp
2023-06-28 19:49:08 +00:00
xh
2023-03-22 22:56:56 +00:00
yarn
]