1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: begin zsh again

This commit is contained in:
oddlama 2023-02-15 02:58:32 +01:00
parent 86b5751410
commit 9d54466669
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 100 additions and 19 deletions

View file

@ -13,6 +13,7 @@
./starship.nix
#./tmux.nix
#./xdg.nix
./zsh.nix
];
home = {

View file

@ -7,8 +7,6 @@ with lib; {
# FIXME: ctrl-del not working
# FIXME: DEL also deletes to the left :(
# FIXME: ignore certain history entries (" .*", ...)
# FIXME: after tab give space
# FIXME: fzf tab let multi
programs.fish = {
enable = true;
interactiveShellInit = mkMerge [

82
users/common/zsh.nix Normal file
View file

@ -0,0 +1,82 @@
{
lib,
pkgs,
...
}:
with lib; {
programs.zsh = {
enable = true;
envExtra = ''
umask 077
'';
dotDir = ".config/zsh";
history = {
path = "/dev/null";
save = 0;
size = 0;
};
initExtra = mkMerge [
(mkBefore ''
unset HISTFILE
# Reset all keybinds and use emacs keybinds
bindkey -d
bindkey -e
typeset -A key
key=(
Home "''${terminfo[khome]}"
End "''${terminfo[kend]}"
Insert "''${terminfo[kich1]}"
Delete "''${terminfo[kdch1]}"
Up "''${terminfo[kcuu1]}"
Down "''${terminfo[kcud1]}"
Left "''${terminfo[kcub1]}"
Right "''${terminfo[kcuf1]}"
PageUp "''${terminfo[kpp]}"
PageDown "''${terminfo[knp]}"
BackTab "''${terminfo[kcbt]}"
)
bindkey "''${key[Delete]}" delete-char
bindkey "''${key[Home]}" beginning-of-line
bindkey "''${key[End]}" end-of-line
bindkey "''${key[Up]}" history-beginning-search-backward-end
bindkey "''${key[Down]}" history-beginning-search-forward-end
bindkey "''${key[PageUp]}" history-beginning-search-backward-end
bindkey "''${key[PageDown]}" history-beginning-search-forward-end
'')
(mkAfter ''
'')
];
plugins = [
{
name = "fzf-tab";
src = pkgs.fetchFromGitHub {
owner = "Aloxaf";
repo = "fzf-tab";
rev = "69024c27738138d6767ea7246841fdfc6ce0d0eb";
sha256 = "07wwcplyb2mw10ia9y510iwfhaijnsdcb8yv2y3ladhnxjd6mpf8";
};
}
{
name = "fast-syntax-highlighting";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "7c390ee3bfa8069b8519582399e0a67444e6ea61";
sha256 = "0gh4is2yzwiky79bs8b5zhjq9khksrmwlaf13hk3mhvpgs8n1fn0";
};
}
{
name = "zsh-autosuggestions";
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-autosuggestions";
rev = "a411ef3e0992d4839f0732ebeb9823024afaaaa8";
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
};
}
];
};
}

View file

@ -15,7 +15,7 @@ with lib; {
["wheel" "input" "video"]
++ optionals config.sound.enable ["audio"];
isNormalUser = true;
shell = pkgs.fish;
shell = pkgs.zsh;
};
home-manager.users.myuser = {

View file

@ -8,7 +8,7 @@ with lib; {
users.users.root = {
hashedPassword = "$6$EBo/CaxB.dQoq2W8$lo2b5vKgJlLPdGGhEqa08q3Irf1Zd1PcFBCwJOrG8lqjwbABkn1DEhrMh1P3ezwnww2HusUBuZGDSMa4nvSQg1";
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"];
shell = pkgs.fish;
shell = pkgs.zsh;
};
home-manager.users.root = {