enable zsh again
This commit is contained in:
parent
a1d612cc80
commit
a9976ba2b6
@ -1,55 +1,46 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
cfg = config.programs.shell;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
programs.zsh = {
|
||||||
options.programs.shell = {
|
enable = true;
|
||||||
enable = lib.mkEnableOption "shell";
|
syntaxHighlighting.enable = true;
|
||||||
};
|
enableAutosuggestions = true;
|
||||||
config = lib.mkIf cfg.enable {
|
loginExtra = ''
|
||||||
programs.zsh = {
|
[ "$(tty)" = "/dev/tty1" ] && exec sway
|
||||||
enable = true;
|
'';
|
||||||
syntaxHighlighting.enable = true;
|
sessionVariables = {
|
||||||
enableAutosuggestions = true;
|
PASSWORD_STORE_DIR = "$HOME/.password-store";
|
||||||
loginExtra = ''
|
|
||||||
[ "$(tty)" = "/dev/tty1" ] && exec sway
|
|
||||||
'';
|
|
||||||
sessionVariables = {
|
|
||||||
PASSWORD_STORE_DIR = "$HOME/.password-store";
|
|
||||||
};
|
|
||||||
shellAliases = {
|
|
||||||
cal = "cal $(date +%Y)";
|
|
||||||
ssh = "TERM=xterm-256color ssh";
|
|
||||||
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)";
|
|
||||||
gad = "git add . && git diff --cached";
|
|
||||||
gac = "ga && gc";
|
|
||||||
gach = "gac -C HEAD";
|
|
||||||
ga = "git add .";
|
|
||||||
gc = "git commit";
|
|
||||||
dev = "nix develop --command $SHELL";
|
|
||||||
la = "ls -alh";
|
|
||||||
torrent = "transmission-remote";
|
|
||||||
vi = "nvim";
|
|
||||||
};
|
|
||||||
history = {
|
|
||||||
expireDuplicatesFirst = true;
|
|
||||||
};
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "zsh-powerlevel10k";
|
|
||||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
|
||||||
file = "powerlevel10k.zsh-theme";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zsh-nix-shell";
|
|
||||||
file = "nix-shell.plugin.zsh";
|
|
||||||
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
initExtra = ''
|
|
||||||
source "$HOME/.p10k.zsh"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
shellAliases = {
|
||||||
|
cal = "cal $(date +%Y)";
|
||||||
|
ssh = "TERM=xterm-256color ssh";
|
||||||
|
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)";
|
||||||
|
gad = "git add . && git diff --cached";
|
||||||
|
gac = "ga && gc";
|
||||||
|
gach = "gac -C HEAD";
|
||||||
|
ga = "git add .";
|
||||||
|
gc = "git commit";
|
||||||
|
dev = "nix develop --command $SHELL";
|
||||||
|
la = "ls -alh";
|
||||||
|
torrent = "transmission-remote";
|
||||||
|
vi = "nvim";
|
||||||
|
};
|
||||||
|
history = {
|
||||||
|
expireDuplicatesFirst = true;
|
||||||
|
};
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "zsh-powerlevel10k";
|
||||||
|
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
||||||
|
file = "powerlevel10k.zsh-theme";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-nix-shell";
|
||||||
|
file = "nix-shell.plugin.zsh";
|
||||||
|
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
initExtra = ''
|
||||||
|
source "$HOME/.p10k.zsh"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user