{ config, pkgs, ... }: { # ── Home-manager: user-level packages & config ────────── home.username = "blake"; home.homeDirectory = "/home/blake"; home.stateVersion = "24.11"; # ── User packages (installed via home-manager) ────────── home.packages = with pkgs; [ # Development - Go tooling go gopls delve golangci-lint # Development - Ruby on Rails ruby bundler nodejs yarn rbenv rubyPackages.rails # Development - Python python3 python3Packages.pip python3Packages.virtualenv python3Packages.pynvim # Shell tools oh-my-posh eza bat fzf ripgrep fd jq zoxide tldr unzip wget curl # Cloud / DevOps kubectl k9s terraform helm kubectx stern dive trivy ansible awscli2 direnv # Networking nmap mtr tcpdump socat whois iperf3 traceroute # System btop fastfetch httpie gh git tmux # Neovim neovim ]; # ── Git configuration ──────────────────────────────────── programs.git = { enable = true; userName = "Blake Ridgway"; userEmail = "blake@blakeridgway.com"; signing = { # signByDefault = true; # key = "..."; }; extraConfig = { init.defaultBranch = "main"; core.editor = "nvim"; pull.rebase = true; commit.template = "~/dotfiles/commit-conventions.txt"; }; includes = [ { path = "~/dotfiles/.gitconfig-advancedmetrics"; condition = "gitdir:~/dev/AdvancedMetrics/"; } ]; }; # ── Shell: Zsh ─────────────────────────────────────────── programs.zsh = { enable = true; enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; shellAliases = { # Unix ll = "ls -la"; ln = "ln -v"; mkdir = "mkdir -p"; e = "nvim"; v = "nvim"; # System cpu = "btop"; mem = "btop"; # Git ga = "git add"; gaa = "git add ."; gc = "git commit"; gp = "git push -u origin \"$(git symbolic-ref --short HEAD)\""; gs = "git status"; nah = "git reset --hard; git clean -df;"; grr = "git remote remove origin"; gra = "git remote add origin"; # Python initvenv = "python3 -m venv venv"; startvenv = "source venv/bin/activate"; stopvenv = "deactivate"; pyinstall = "python3 -m pip install -r requirements.txt"; py = "python3"; py3 = "python3"; python = "python3"; pip = "pip3"; # Go gorun = "go run"; gobuild = "go build"; gotest = "go test ./..."; gotidy = "go mod tidy"; gofmt = "go fmt ./..."; # Ruby on Rails rails = "rails"; rake = "rake"; bundle = "bundle"; be = "bundle exec"; bi = "bundle install"; bu = "bundle update"; rdm = "rails db:migrate"; rdr = "rails db:rollback"; rds = "rails db:seed"; rrg = "rails generate"; rrc = "rails console"; rrs = "rails server"; rroutes = "rails routes"; # Kubernetes k = "kubectl"; kg = "kubectl get"; kgp = "kubectl get pods"; kgs = "kubectl get svc"; kgd = "kubectl get deployments"; kgn = "kubectl get nodes"; kd = "kubectl describe"; kl = "kubectl logs"; klf = "kubectl logs -f"; kx = "kubectx"; kn = "kubens"; # Terraform tf = "terraform"; tfi = "terraform init"; tfa = "terraform apply"; tfp = "terraform plan"; tfd = "terraform destroy"; tff = "terraform fmt -recursive"; tfv = "terraform validate"; tfo = "terraform output"; # AWS awsl = "aws ec2 describe-instances --query \"Reservations[*].Instances[*].[InstanceId,State.Name,Tags[?Key=='Name'].Value|[0]]\" --output table"; # Docker d = "docker"; dc = "docker compose"; dcu = "docker compose up -d"; dcd = "docker compose down"; dps = "docker ps --format \"table {{.ID}}\\t{{.Names}}\\t{{.Status}}\\t{{.Ports}}\""; # Networking ports = "ss -tlnp"; myip = "curl -4 icanhazip.com"; listening = "ss -tlnp"; # Config vimrc = "nvim ~/.config/nvim/init.lua"; ealias = "nvim ~/dotfiles/aliases.zsh"; zshrc = "nvim ~/.zshrc"; bashrc = "nvim ~/.bashrc"; path = "echo $PATH | tr -s ':' '\\n'"; }; initExtra = '' # Nix profile paths if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/nix.sh" fi # Go export GOPATH="$HOME/go" export PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" # Ruby on Rails (rbenv) export PATH="$PATH:$HOME/.rbenv/bin" eval "$(rbenv init - zsh 2>/dev/null || true)" # Local binaries export PATH="$PATH:$HOME/.local/bin:$HOME/bin" # Editor export EDITOR="nvim" # SSH agent if [ -z "$SSH_AGENT_PID" ]; then eval "$(ssh-agent -s)" >/dev/null 2>&1 ssh-add -A 2>/dev/null || true fi # Key timeout export KEYTIMEOUT=1 # Oh My Posh prompt if command -v oh-my-posh &>/dev/null; then eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.omp.json)" fi ''; }; # ── Neovim config (managed separately via dotfiles) ────── # The nvim config lives in ~/dotfiles/nvim/ and is symlinked # by the dotfiles setup script (04-config-symlinks.sh). # ── Starship / Oh My Posh theme symlink ────────────────── home.file.".config/oh-my-posh/theme.omp.json".source = ../terminal/posh-theme.omp.json; # ── Nushell config symlink ─────────────────────────────── home.file.".config/nushell".source = ../terminal/nushell; # ── Dotfile symlinks ───────────────────────────────────── home.file.".bashrc".source = ../bashrc; home.file.".zshrc".source = ../zshrc; home.file.".aliases.bash".source = ../aliases.bash; home.file.".aliases.zsh".source = ../aliases.zsh; home.file.".gitconfig".source = ../gitconfig; home.file.".gitignore".source = ../gitignore; home.file.".agignore".source = ../agignore; home.file.".commit-conventions.txt".source = ../commit-conventions.txt; # Let home-manager manage itself programs.home-manager.enable = true; }