From 7a8ffd9a2e55fc31c660695ee4f065422d1a7f56 Mon Sep 17 00:00:00 2001 From: oddlama Date: Thu, 29 Dec 2022 13:39:44 +0100 Subject: [PATCH] chore: remove zsh for now --- users/common/default.nix | 4 -- users/common/starship.nix | 3 +- users/common/zsh.nix | 78 --------------------------------------- users/myuser/default.nix | 11 ++++-- users/root/default.nix | 2 +- 5 files changed, 10 insertions(+), 88 deletions(-) delete mode 100644 users/common/zsh.nix diff --git a/users/common/default.nix b/users/common/default.nix index 034a933..0abd684 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -13,7 +13,6 @@ ./starship.nix #./tmux.nix #./xdg.nix - #./zsh.nix ]; home = { @@ -32,7 +31,6 @@ l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto"; t = "tree -F --dirsfirst -L 2"; tt = "tree -F --dirsfirst -L 3 --filelimit 16"; - ttt = "tree -F --dirsfirst -L 6 --filelimit 16"; cpr = "rsync -axHAWXS --numeric-ids --info=progress2"; md = "mkdir"; @@ -46,8 +44,6 @@ ip = "ip --color"; tmux = "tmux -2"; rg = "rg -S"; - - p = "cd ~/projects"; }; }; diff --git a/users/common/starship.nix b/users/common/starship.nix index b542c18..da55ba9 100644 --- a/users/common/starship.nix +++ b/users/common/starship.nix @@ -1,7 +1,6 @@ {lib, ...}: { programs.starship = { enable = true; - enableNushellIntegration = true; settings = { add_newline = false; format = lib.concatStrings [ @@ -69,7 +68,7 @@ staged = "+$count "; renamed = "→$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 = { pipestatus = true; diff --git a/users/common/zsh.nix b/users/common/zsh.nix deleted file mode 100644 index fe8bff8..0000000 --- a/users/common/zsh.nix +++ /dev/null @@ -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"; - }; - } - ]; - }; -} diff --git a/users/myuser/default.nix b/users/myuser/default.nix index dcea5c0..fe6df42 100644 --- a/users/myuser/default.nix +++ b/users/myuser/default.nix @@ -14,7 +14,7 @@ with lib; { ["wheel" "input" "video"] ++ optionals config.sound.enable ["audio"]; isNormalUser = true; - shell = pkgs.zsh; + shell = pkgs.fish; }; home-manager.users.myuser = { @@ -31,7 +31,12 @@ with lib; { # ./graphical/i3 ]; - home.username = config.users.users.myuser.name; - home.uid = config.users.users.myuser.uid; + home = { + username = config.users.users.myuser.name; + uid = config.users.users.myuser.uid; + shellAliases = { + p = "cd ~/projects"; + }; + }; }; } diff --git a/users/root/default.nix b/users/root/default.nix index 7744c38..50fd91e 100644 --- a/users/root/default.nix +++ b/users/root/default.nix @@ -8,7 +8,7 @@ with lib; { users.users.root = { initialHashedPassword = "$6$EBo/CaxB.dQoq2W8$lo2b5vKgJlLPdGGhEqa08q3Irf1Zd1PcFBCwJOrG8lqjwbABkn1DEhrMh1P3ezwnww2HusUBuZGDSMa4nvSQg1"; openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"]; - shell = pkgs.zsh; + shell = pkgs.fish; }; home-manager.users.root = {