view zsh.nix @ 4:7c8c5e548075 default tip

fix stuff
author Yasuri <yasuri@charliesmp.net>
date Sat, 03 Oct 2026 19:23:53 -0500
parents face7f4d84f7
children
line wrap: on
line source

{ config, pkgs, ... }:

{
  programs.zsh = {
    enable = true;
    enableCompletion = true;
    autosuggestion.enable = true;
    syntaxHighlighting.enable = true;

    history = {
      size = 10000;
      save = 10000;
      ignoreAllDups = true;
      share = true;
      path = "${config.xdg.dataHome}/zsh/history";
    };

    shellAliases = {
      ll = "ls -lah";
      rebuild = "sudo nixos-rebuild switch --flake .";
      hf = "hyfetch";
      fastfetch = "hyfetch";
      ff = "hyfetch";
    };

    initContent = ''
      setopt autocd interactivecomments
      bindkey -e
      zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
      zstyle ':completion:*' menu select
      hyfetch
    '';
  };

  # keeps you in zsh inside nix-shell and nix develop
  programs.nix-your-shell = {
    enable = true;
    enableZshIntegration = true;
  };
}