|
1 | 1 | { config, pkgs, username, lib, ... }: |
2 | 2 |
|
3 | 3 | { |
4 | | - imports = [ ./zsh.nix ./git.nix ./aws.nix ./ramdisk.nix ]; |
| 4 | + imports = [ ./zsh.nix ./git.nix ./aws.nix ./ramdisk.nix ./github.nix ]; |
5 | 5 |
|
6 | 6 | # Explicitly tell home-manager not to manage nix.conf |
7 | 7 | xdg.configFile."nix/nix.conf".enable = false; |
|
10 | 10 | home.activation.setupBinDir = lib.hm.dag.entryAfter [ "writeBoundary" ] '' |
11 | 11 | mkdir -p $HOME/.bin |
12 | 12 | chmod 755 $HOME/.bin |
| 13 | +
|
| 14 | + # Generate aliases file for all executable scripts in .bin |
| 15 | + if [ -d "$HOME/.bin" ]; then |
| 16 | + # Create a file that will be sourced by zsh |
| 17 | + ALIAS_FILE="$HOME/.bin_aliases" |
| 18 | + echo "# Auto-generated aliases for scripts in ~/.bin" > "$ALIAS_FILE" |
| 19 | + |
| 20 | + if [ "$(ls -A $HOME/.bin 2>/dev/null)" ]; then |
| 21 | + echo "# Generated on $(date)" >> "$ALIAS_FILE" |
| 22 | + # Make all scripts executable |
| 23 | + chmod +x "$HOME/.bin"/* 2>/dev/null || true |
| 24 | + |
| 25 | + for script in "$HOME/.bin"/*; do |
| 26 | + if [ -f "$script" ] && [ -x "$script" ]; then |
| 27 | + script_name=$(basename "$script" .sh) |
| 28 | + echo "alias $script_name=\"$script\"" >> "$ALIAS_FILE" |
| 29 | + fi |
| 30 | + done |
| 31 | + echo "Auto-generated $(grep -c "^alias" "$ALIAS_FILE") aliases for ~/.bin scripts" |
| 32 | + else |
| 33 | + echo "# No scripts found in ~/.bin" >> "$ALIAS_FILE" |
| 34 | + echo "No scripts found in ~/.bin directory to create aliases for" |
| 35 | + fi |
| 36 | + |
| 37 | + chmod 644 "$ALIAS_FILE" |
| 38 | + fi |
13 | 39 | ''; |
14 | 40 |
|
15 | 41 | nixpkgs.config.allowUnfree = true; |
|
30 | 56 | # Tools needed by zsh configuration |
31 | 57 | zoxide |
32 | 58 | oh-my-posh |
33 | | - eza # Modern ls replacement |
| 59 | + eza |
| 60 | + gh |
34 | 61 |
|
35 | 62 | # Vagrant-specific development tools |
36 | 63 | git |
|
47 | 74 | # Terraform tools |
48 | 75 | terraform-docs |
49 | 76 | terraform-ls |
50 | | - |
| 77 | + |
51 | 78 | # Node.js tools |
52 | 79 | nodePackages.pnpm |
53 | | - |
| 80 | + |
54 | 81 | tmux |
55 | 82 | htop |
56 | 83 | jq |
|
0 commit comments