view zsh.nix @ 1:f78c8a98f113

Add new stuff and remove useless overlay in home.nix
author Yasuri <yasuri@charliesmp.net>
date Fri, 02 Oct 2026 18:58:29 -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;
  };
}