Migrate zsh config
This commit is contained in:
42
modules/shell/zsh/default.nix
Normal file
42
modules/shell/zsh/default.nix
Normal 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 };
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user