Heavily inspired by https://github.com/Doc-Steve/dendritic-design-with-flake-parts. > Atomic commits? Never heard of them!
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ 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";
|
|
};
|
|
};
|
|
};
|
|
}
|