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

chore: remove zsh for now

This commit is contained in:
oddlama 2022-12-29 13:39:44 +01:00
parent 79129d60ea
commit 7a8ffd9a2e
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
5 changed files with 10 additions and 88 deletions

View file

@ -13,7 +13,6 @@
./starship.nix ./starship.nix
#./tmux.nix #./tmux.nix
#./xdg.nix #./xdg.nix
#./zsh.nix
]; ];
home = { home = {
@ -32,7 +31,6 @@
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto"; l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
t = "tree -F --dirsfirst -L 2"; t = "tree -F --dirsfirst -L 2";
tt = "tree -F --dirsfirst -L 3 --filelimit 16"; tt = "tree -F --dirsfirst -L 3 --filelimit 16";
ttt = "tree -F --dirsfirst -L 6 --filelimit 16";
cpr = "rsync -axHAWXS --numeric-ids --info=progress2"; cpr = "rsync -axHAWXS --numeric-ids --info=progress2";
md = "mkdir"; md = "mkdir";
@ -46,8 +44,6 @@
ip = "ip --color"; ip = "ip --color";
tmux = "tmux -2"; tmux = "tmux -2";
rg = "rg -S"; rg = "rg -S";
p = "cd ~/projects";
}; };
}; };

View file

@ -1,7 +1,6 @@
{lib, ...}: { {lib, ...}: {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableNushellIntegration = true;
settings = { settings = {
add_newline = false; add_newline = false;
format = lib.concatStrings [ format = lib.concatStrings [
@ -69,7 +68,7 @@
staged = "+$count "; staged = "+$count ";
renamed = "$count "; renamed = "$count ";
deleted = "-$count "; deleted = "-$count ";
format = "[$conflicted](red)[$stashed](magenta)[$staged](green)[$deleted](red)[$renamed](blue)[$modified](yellow)[$untracked](yellow)[$ahead_behind](green)"; format = "[$conflicted](red)[$stashed](magenta)[$staged](green)[$deleted](red)[$renamed](blue)[$modified](yellow)[$untracked](blue)[$ahead_behind](green)";
}; };
status = { status = {
pipestatus = true; pipestatus = true;

View file

@ -1,78 +0,0 @@
{
config,
pkgs,
...
}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = pkgs.stdenv.isLinux;
autocd = true;
dotDir = ".config/zsh";
history = {
expireDuplicatesFirst = true;
extended = true;
ignoreDups = true;
path = "${config.xdg.dataHome}/zsh/history";
save = 10000;
share = true;
};
envExtra = ''
export LESSHISTFILE="${config.xdg.dataHome}/less_history"
export CARGO_HOME="${config.xdg.cacheHome}/cargo"
'';
initExtra = ''
nix-closure-size() {
nix-store -q --size $(nix-store -qR $(${pkgs.coreutils}/bin/readlink -e $1) ) |
${pkgs.gawk}/bin/gawk '{ a+=$1 } END { print a }' |
${pkgs.coreutils}/bin/numfmt --to=iec-i
}
bindkey "$${terminfo[khome]}" beginning-of-line
bindkey "$${terminfo[kend]}" end-of-line
bindkey "$${terminfo[kdch1]}" delete-char
bindkey '\eOA' history-substring-search-up
bindkey '\eOB' history-substring-search-down
bindkey "^[[A" history-substring-search-up
bindkey "^[[B" history-substring-search-down
bindkey "$$terminfo[kcuu1]" history-substring-search-up
bindkey "$$terminfo[kcud1]" history-substring-search-down
bindkey "^[[1;5C" forward-word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[1;3D" backward-word
bindkey -s "^O" 'fzf | xargs -r $VISUAL^M'
bindkey -rpM viins '^[^['
KEYTIMEOUT=1
${pkgs.any-nix-shell}/bin/any-nix-shell zsh | source /dev/stdin
'';
sessionVariables = {
RPROMPT = "";
};
plugins = [
{
# https://github.com/hlissner/zsh-autopair
name = "zsh-autopair";
file = "zsh-autopair.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "hlissner";
repo = "zsh-autopair";
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
};
}
{
# https://github.com/zsh-users/zsh-history-substring-search
name = "zsh-history-substring-search";
file = "zsh-history-substring-search.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-history-substring-search";
rev = "0f80b8eb3368b46e5e573c1d91ae69eb095db3fb";
sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
};
}
];
};
}

View file

@ -14,7 +14,7 @@ with lib; {
["wheel" "input" "video"] ["wheel" "input" "video"]
++ optionals config.sound.enable ["audio"]; ++ optionals config.sound.enable ["audio"];
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.fish;
}; };
home-manager.users.myuser = { home-manager.users.myuser = {
@ -31,7 +31,12 @@ with lib; {
# ./graphical/i3 # ./graphical/i3
]; ];
home.username = config.users.users.myuser.name; home = {
home.uid = config.users.users.myuser.uid; username = config.users.users.myuser.name;
uid = config.users.users.myuser.uid;
shellAliases = {
p = "cd ~/projects";
};
};
}; };
} }

View file

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