This repository has been archived on 2023-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles/modules/shell/zsh/default.nix
2023-01-03 00:13:29 +00:00

42 lines
776 B
Nix

{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.shell.zsh;
in {
options.modules.shell.zsh = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
};
user.packages = with pkgs; [
fd
fzf
jq
nix-zsh-completions
nnn
ripgrep
zsh
zsh-autosuggestions
zsh-fast-syntax-highlighting
zsh-history-substring-search
];
env = {
ZDOTDIR = "$XDG_CONFIG_HOME/zsh";
ZSH_CACHE = "$XDG_CACHE_HOME/zsh";
};
home.configFile = {
"zsh/.zshrc" = { source = ./.zshrc; };
"zsh/aliases.zsh" = { source = ./aliases.zsh; };
};
};
}