{ pkgs, ... }: {

  home.packages = with pkgs; [
    meslo-lgs-nf
  ];

  programs = {
    zoxide.enable = true;
    eza.enable = true;
    tealdeer = {
      enable = true;
      settings = {
        updates.auto_update = true;
      };
    };
    atuin = {
      enable = true;
      enableZshIntegration = true;
      settings = {
          enter_accept = false;
          filter_mode = "host";
          filter_mode_shell_up_key_binding = "session";
      };
    };
    zsh = {
      enable = true;
      enableCompletion = true;
      autosuggestion.enable = true;
      syntaxHighlighting.enable = true;
      history.size = 100000000;

      shellAliases = {
        cd = "z";
        ls = "eza";
        mvi = "mv -t ~/Nextcloud/INBOX";
        sdb = "sdb-client";
        open = "xdg-open";
        reload = "source ~/.zshrc";
        histogram = "awkuniq -c | sort -nr";
        start-day = "emacsclient -c -n -e '(jm/org-roam-capture-today)'";
        json-less = "jq -C . | less -R";
        csv2json = "python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'";

        # Server user/address aliases
        r330-idrac = "bw-ssh iDRAC root@192.168.100.11 racadm";
        r730xd-idrac = "bw-ssh iDRAC root@192.168.100.12 racadm";
        ideapad = "ssh root@192.168.100.20";
        r330-proxmox = "ssh root@192.168.100.21";
        r730xd-proxmox = "ssh root@192.168.100.22";
        r330-media = "ssh media@192.168.100.40";
        r330-logging = "ssh logging@192.168.100.41";
        sampledb-dev = "ssh sampledb@192.168.100.42";
        mindforge = "ssh mindforge@mindforge.randomctf.local";

        # Nix Specific aliases
        update-config = "sudo nixos-rebuild switch --flake ~/dotfiles";
        update-home = "home-manager switch --flake ~/dotfiles";
        update-all = "update-config && update-home";
      };

      initContent = ''
      export PATH=$PATH:~/.cargo/bin
      function ..      { cd .. }
      function ...     { cd ../.. }
      function ....    { cd ../../.. }
      function .....   { cd ../../../../.. }
      function ......  { cd ../../../../../.. }
      function ....... { cd ../../../../../../.. }

      if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then
          export TERM="xterm-256color"
      fi

      source ~/dotfiles/bash-scripts/aliases.sh
      '';

      plugins = [
        {
          name = "custom-functions";
          src = ../../dotfiles;
          file = ".functions.zsh";
        }
        {
          name = "powerlevel10k-config";
          src = ../../dotfiles;
          file = ".p10k.zsh";
        }
      ];

      zplug = {
        enable = true;
        plugins = [
          { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; }
        ];
      };
    };
  };

  home.file = {
      ".functions.zsh".source = ../../dotfiles/.functions.zsh;
  };
}
