dotfiles/modules/shell/utilities.nix

83 lines
1.8 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
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-11-05 17:41:09 +00:00
config = {
2022-11-05 17:41:09 +00:00
home-manager.users.${config.user} = {
2023-02-02 16:01:12 +00:00
# Fix: age won't build
nixpkgs.overlays = [
(final: prev: {
age = prev.age.overrideAttrs (old: {
src = prev.fetchFromGitHub {
owner = "FiloSottile";
repo = "age";
rev = "7354aa0d08a06eac42c635670a55f858bd23c943";
sha256 = "H80mNTgZmExDMgubONIXP7jmLBvNMVqXee6NiZJhPFY=";
};
});
})
];
2022-11-05 17:41:09 +00:00
home.packages = with pkgs; [
unzip # Extract zips
rsync # Copy folders
ripgrep # grep
fd # find
sd # sed
jq # JSON manipulation
tealdeer # Cheatsheets
tree # View directory hierarchy
htop # Show system processes
glow # Pretty markdown previews
qrencode # Generate qr codes
vimv-rs # Batch rename files
dig # DNS lookup
lf # File viewer
inetutils # Includes telnet, whois
age # Encryption
];
2022-05-06 13:29:25 +00:00
2022-11-05 17:41:09 +00:00
programs.zoxide.enable = true; # Shortcut jump command
2022-11-05 17:41:09 +00:00
home.file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
".digrc".text = "+noall +answer"; # Cleaner dig commands
};
2022-04-30 14:21:43 +00:00
2022-11-05 17:41:09 +00:00
programs.bat = {
enable = true; # cat replacement
config = { theme = config.theme.colors.batTheme; };
2022-04-30 14:21:43 +00:00
};
2022-11-05 17:41:09 +00:00
programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat
2022-04-30 14:21:43 +00:00
};
2022-11-05 17:41:09 +00:00
programs.fish.functions = {
ping = {
description = "Improved ping";
argumentNames = "target";
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
};
};
2022-04-30 14:21:43 +00:00
};
2022-04-29 00:46:00 +00:00
};
2022-04-28 23:20:46 +00:00
}