Migrate zsh config

This commit is contained in:
2023-01-02 23:45:01 +00:00
parent 71b5eee6ed
commit 903cbdc9da
4 changed files with 20 additions and 19 deletions

View File

@ -0,0 +1,42 @@
{ 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 };
};
};
}