Update to (somewhat?) dendritic pattern
Heavily inspired by https://github.com/Doc-Steve/dendritic-design-with-flake-parts. > Atomic commits? Never heard of them!
This commit is contained in:
53
modules/programs/zsh/zsh.nix
Normal file
53
modules/programs/zsh/zsh.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.zsh = {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.zsh = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
fzf
|
||||
zoxide
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
date
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "p10k-config";
|
||||
src = ./p10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user