Consolidate CLI tools and fix git aliases
- Consolidated 25+ common CLI tools into modules/common/base.nix - Added modern rust-based tools (eza, bat, ripgrep, etc.) system-wide - Removed duplicated packages from user and machine configs - Added consistent shell aliases for modern CLI tools - Fixed gpa alias to properly push to all remotes - Removed duplicate git-push-all alias from geir.nix - Added comprehensive documentation in CLI_TOOLS_CONSOLIDATION.md Benefits: - Single source of truth for common CLI tools - Reduced duplication across 7+ configuration files - Improved git workflow with flexible multi-remote pushing - Better maintainability and consistency
This commit is contained in:
parent
73c3ac9386
commit
8884c42cf2
8 changed files with 188 additions and 85 deletions
|
@ -1,29 +1,72 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Base system packages and aliases shared across all machines
|
||||
# This module consolidates common CLI tools to reduce duplication
|
||||
# across user configurations and machine-specific configs
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
tldr
|
||||
eza
|
||||
bat
|
||||
ripgrep
|
||||
du-dust
|
||||
bottom
|
||||
fd
|
||||
fzf
|
||||
zoxide
|
||||
uutils-coreutils-noprefix
|
||||
direnv # Directory-based environment management
|
||||
nix-direnv # Nix integration for direnv
|
||||
# Modern CLI tools (rust-based replacements)
|
||||
tldr # Better man pages
|
||||
eza # Better ls
|
||||
bat # Better cat
|
||||
ripgrep # Better grep
|
||||
du-dust # Better du
|
||||
bottom # Better top
|
||||
fd # Better find
|
||||
fzf # Fuzzy finder
|
||||
zoxide # Better cd
|
||||
uutils-coreutils-noprefix # Modern coreutils
|
||||
|
||||
# Environment management
|
||||
direnv # Directory-based environment management
|
||||
nix-direnv # Nix integration for direnv
|
||||
|
||||
# Essential system tools
|
||||
curl # HTTP client
|
||||
wget # Download utility
|
||||
git # Version control
|
||||
htop # Process viewer
|
||||
tree # Directory tree viewer
|
||||
file # File type detection
|
||||
unzip # Archive extraction
|
||||
zip # Archive creation
|
||||
fastfetch
|
||||
zellij
|
||||
glances
|
||||
systemctl-tui
|
||||
|
||||
# Text processing and utilities
|
||||
jq # JSON processor
|
||||
yq # YAML processor
|
||||
|
||||
# Network utilities
|
||||
nmap # Network mapper
|
||||
|
||||
# System monitoring and diagnostics
|
||||
lsof # List open files
|
||||
strace # System call tracer
|
||||
ncdu # Disk usage analyzer
|
||||
|
||||
# Development basics
|
||||
github-cli # GitHub CLI
|
||||
];
|
||||
environment.shellAliases = {
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
h = "tldr";
|
||||
# oxidized
|
||||
# Modern CLI tool replacements
|
||||
ls = "eza -l";
|
||||
cat = "bat";
|
||||
grep = "rg";
|
||||
top = "btm";
|
||||
du = "dust";
|
||||
find = "fd";
|
||||
# Common git shortcuts (basic ones)
|
||||
gs = "git status";
|
||||
ga = "git add";
|
||||
gc = "git commit";
|
||||
gp = "git push";
|
||||
gpa = "git remote | xargs -L1 git push";
|
||||
gl = "git log --oneline -10";
|
||||
};
|
||||
}
|
|
@ -25,23 +25,14 @@
|
|||
|
||||
# Common aliases for all users
|
||||
shellAliases = {
|
||||
# Modern CLI tool replacements
|
||||
"ls" = "eza --color=auto --group-directories-first";
|
||||
# Modern CLI tool replacements (basic ones moved to base.nix)
|
||||
"ll" = "eza -l --color=auto --group-directories-first";
|
||||
"la" = "eza -la --color=auto --group-directories-first";
|
||||
"tree" = "eza --tree";
|
||||
|
||||
# Git shortcuts
|
||||
"gs" = "git status";
|
||||
"ga" = "git add";
|
||||
"gc" = "git commit";
|
||||
"gp" = "git push";
|
||||
"gl" = "git log --oneline -10";
|
||||
# Git shortcuts (basic ones moved to base.nix)
|
||||
|
||||
# System shortcuts
|
||||
"grep" = "rg";
|
||||
"find" = "fd";
|
||||
"cat" = "bat";
|
||||
# System shortcuts (some moved to base.nix)
|
||||
"top" = "btop";
|
||||
|
||||
# Network
|
||||
|
@ -64,21 +55,14 @@
|
|||
|
||||
# Common packages for all users
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Essential CLI tools (already configured in base.nix)
|
||||
# Essential CLI tools moved to base.nix
|
||||
# Adding user-specific tools here
|
||||
|
||||
# Communication
|
||||
firefox
|
||||
|
||||
# Development (basic)
|
||||
git
|
||||
curl
|
||||
wget
|
||||
|
||||
# Utilities
|
||||
file
|
||||
unzip
|
||||
zip
|
||||
# Development (basic tools moved to base.nix)
|
||||
# Additional utilities not in base.nix
|
||||
];
|
||||
|
||||
# Common security settings
|
||||
|
|
|
@ -41,23 +41,15 @@ in
|
|||
kitty
|
||||
terminator
|
||||
starship
|
||||
fastfetch
|
||||
hyfetch
|
||||
zellij
|
||||
glances
|
||||
htop
|
||||
bottom
|
||||
systemctl-tui
|
||||
|
||||
# Essential system tools
|
||||
wget
|
||||
curl
|
||||
|
||||
# Essential system tools (moved duplicates to base.nix)
|
||||
mc
|
||||
|
||||
# Browsers & Communication
|
||||
firefox
|
||||
chromium
|
||||
vesktop
|
||||
vivaldi vivaldi-ffmpeg-codecs
|
||||
|
||||
# Shell Enhancement & Fun
|
||||
nerdfetch
|
||||
|
@ -70,14 +62,12 @@ in
|
|||
pavucontrol
|
||||
|
||||
# Productivity
|
||||
libreoffice
|
||||
koodo-reader
|
||||
|
||||
# Development & System Management
|
||||
neovim
|
||||
vscode
|
||||
git-credential-manager
|
||||
github-cli
|
||||
nodejs
|
||||
nodePackages.npm
|
||||
virt-manager
|
||||
|
@ -85,12 +75,12 @@ in
|
|||
# Creative Tools (optional - remove if not needed)
|
||||
gimp
|
||||
obs-studio
|
||||
|
||||
# File Management
|
||||
nautilus
|
||||
file-roller
|
||||
|
||||
# Containers
|
||||
inkscape
|
||||
|
||||
# AI Tools
|
||||
opencode # AI code assistant
|
||||
|
||||
# Container tools
|
||||
podman-compose
|
||||
podman-desktop
|
||||
|
||||
|
@ -143,8 +133,7 @@ in
|
|||
"collect" = "sudo nix-collect-garbage --d";
|
||||
"optimise" = "sudo nix-store --optimise";
|
||||
|
||||
# Git shortcuts for multi-remote workflow
|
||||
"git-push-all" = "git push origin main && git push github main";
|
||||
# Git shortcuts for multi-remote workflow
|
||||
"git-status-all" = "git status && echo '--- Checking origin ---' && git log origin/main..HEAD --oneline && echo '--- Checking github ---' && git log github/main..HEAD --oneline";
|
||||
|
||||
# Container shortcuts
|
||||
|
|
|
@ -31,33 +31,19 @@
|
|||
|
||||
# Essential admin packages
|
||||
packages = with pkgs; [
|
||||
# System monitoring and diagnostics
|
||||
htop
|
||||
# System monitoring and diagnostics (htop, lsof, strace moved to base.nix)
|
||||
iotop
|
||||
nethogs
|
||||
lsof
|
||||
strace
|
||||
|
||||
# Network tools
|
||||
nmap
|
||||
# Network tools (nmap moved to base.nix)
|
||||
tcpdump
|
||||
wireshark-cli
|
||||
curl
|
||||
wget
|
||||
|
||||
# File and disk utilities
|
||||
tree
|
||||
fd
|
||||
ripgrep
|
||||
fzf
|
||||
ncdu
|
||||
# File and disk utilities (tree, fd, ripgrep, fzf, ncdu moved to base.nix)
|
||||
|
||||
# Text processing
|
||||
jq
|
||||
yq
|
||||
# Text processing (jq, yq moved to base.nix)
|
||||
|
||||
# Version control (for system configs)
|
||||
git
|
||||
# Version control (git moved to base.nix)
|
||||
|
||||
# Container management
|
||||
podman-compose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue