dotfiles/modules/shell/utilities.nix

63 lines
1.2 KiB
Nix
Raw Normal View History

2022-04-30 16:07:58 +00:00
{ pkgs, identity, ... }:
2022-04-29 01:23:43 +00:00
let
ignorePatterns = ''
!.env*
!.github/
!.gitignore
!*.tfvars
.terraform/
.target/
/Library/'';
2022-04-29 01:23:43 +00:00
in {
2022-04-28 23:20:46 +00:00
2022-04-30 16:07:58 +00:00
home-manager.users.${identity.user} = {
2022-04-30 14:21:43 +00:00
home.packages = with pkgs; [
2022-04-30 23:28:19 +00:00
unzip # Extract zips
rsync # Copy folders
ripgrep # grep
bat # cat
fd # find
sd # sed
jq # JSON manipulation
tealdeer # Cheatsheets
tree # View directory hierarchy
htop # Show system processes
glow # Pretty markdown previews
prettyping # ping
qrencode # Generate qr codes
vimv # Batch rename files
dig # DNS lookup
2022-05-02 03:39:50 +00:00
# gnupg
# pass
];
2022-04-30 14:21:43 +00:00
home.file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
2022-04-30 23:28:19 +00:00
".digrc".text = "+noall +answer"; # Cleaner dig commands
};
2022-04-30 14:21:43 +00:00
programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat
};
programs.fish.functions = {
ping = {
description = "Improved ping";
argumentNames = "target";
body = "prettyping --nolegend $target";
};
qr = {
body =
"qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS
};
};
2022-04-29 00:46:00 +00:00
};
2022-04-28 23:20:46 +00:00
}