From c29ebfedcad3ef36557608926aeea68d3106157c Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 20 Feb 2023 15:06:56 -0500 Subject: switch back to fish i don't know why i have to do this but it works so :shurg: --- users/seth/default.nix | 4 +- users/seth/shell/bash.nix | 8 ---- users/seth/shell/fish.nix | 2 +- users/seth/shell/zsh.nix | 82 +++++++++++++++++++++++++++++++++++ users/seth/shell/zsh/default.nix | 94 ---------------------------------------- 5 files changed, 86 insertions(+), 104 deletions(-) create mode 100644 users/seth/shell/zsh.nix delete mode 100644 users/seth/shell/zsh/default.nix (limited to 'users/seth') diff --git a/users/seth/default.nix b/users/seth/default.nix index 909fb84..0675eb4 100644 --- a/users/seth/default.nix +++ b/users/seth/default.nix @@ -8,9 +8,11 @@ extraGroups = [ "wheel" ]; isNormalUser = true; hashedPassword = "***REMOVED***"; - shell = pkgs.zsh; + shell = pkgs.fish; }; + programs.fish.enable = true; + home-manager = { useGlobalPkgs = true; useUserPackages = true; diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix index a80f409..03f4985 100644 --- a/users/seth/shell/bash.nix +++ b/users/seth/shell/bash.nix @@ -4,14 +4,6 @@ historyFile = "${config.xdg.stateHome}/bash/history"; historyFileSize = 1000; historySize = 100; - sessionVariables = { - EDITOR = "nvim"; - VISUAL = "nvim"; - CARGO_HOME = "${config.xdg.dataHome}/cargo"; - RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; - LESSHISTFILE = "${config.xdg.stateHome}/less/history"; - NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; - }; shellOptions = [ "cdspell" "checkjobs" diff --git a/users/seth/shell/fish.nix b/users/seth/shell/fish.nix index 1cfcac1..f00174f 100644 --- a/users/seth/shell/fish.nix +++ b/users/seth/shell/fish.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { programs.fish = { - enable = false; + enable = true; plugins = [ { name = "autopair-fish"; diff --git a/users/seth/shell/zsh.nix b/users/seth/shell/zsh.nix new file mode 100644 index 0000000..dd2b58c --- /dev/null +++ b/users/seth/shell/zsh.nix @@ -0,0 +1,82 @@ +{ config +, pkgs +, ... +}: { + programs.zsh = { + enable = false; + enableAutosuggestions = true; + enableVteIntegration = true; + completionInit = '' + autoload -Uz bashcompinit compinit + local zdump="${config.xdg.cacheHome}/zsh/zdump" + bashcompinit + compinit -d "$zdump" + if [[ ! "$zdump.zwc" -nt "$zdump" ]] + then + zcompile "$zdump" + fi + unset zdump + ''; + defaultKeymap = "emacs"; + dotDir = ".config/zsh"; + initExtra = '' + autoload -Uz promptinit + prompt walters + + zmodload zsh/zutil + zmodload zsh/complist + zstyle ":completion::*" group-name "" + zstyle ":completion:*" menu "select" + zstyle ":completion:*" squeeze-slashes "true" + zstyle ":completion::*" use-cache "true" + zstyle ":completion::*" cache-path "$zdump" + + unsetopt beep + unsetopt hist_beep + unsetopt ignore_braces + unsetopt list_beep + setopt always_to_end + setopt prompt_subst + setopt share_history + + # clear backbuffer with ctrl-l + function clear-screen-and-scrollback() { + echoti civis >"$TTY" + printf '%b' '\e[H\e[2J' >"$TTY" + zle .reset-prompt + zle -R + printf '%b' '\e[3J' >"$TTY" + echoti cnorm >"$TTY" + } + + zle -N clear-screen-and-scrollback + bindkey '^L' clear-screen-and-scrollback + ''; + history = { + expireDuplicatesFirst = true; + path = "${config.xdg.stateHome}/zsh/zsh_history"; + save = 1000; + size = 100; + }; + plugins = [ + { + name = "zsh-completions"; + src = pkgs.zsh-completions; + file = "share/zsh-completions/zsh-completions.plugin.zsh"; + } + + { + name = "cattppuccin-zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "zsh-syntax-highlighting"; + rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea"; + sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo="; + }; + + file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"; + } + ]; + enableSyntaxHighlighting = true; + }; +} diff --git a/users/seth/shell/zsh/default.nix b/users/seth/shell/zsh/default.nix deleted file mode 100644 index 0b5a5dd..0000000 --- a/users/seth/shell/zsh/default.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ config -, pkgs -, ... -}: { - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableVteIntegration = true; - completionInit = '' - autoload -Uz bashcompinit compinit - local zdump="${config.xdg.cacheHome}/zsh/zdump" - bashcompinit - compinit -d "$zdump" - if [[ ! "$zdump.zwc" -nt "$zdump" ]] - then - zcompile "$zdump" - fi - unset zdump - ''; - defaultKeymap = "emacs"; - dotDir = ".config/zsh"; - initExtra = '' - autoload -Uz promptinit - prompt walters - - zmodload zsh/zutil - zmodload zsh/complist - zstyle ":completion::*" group-name "" - zstyle ":completion:*" menu "select" - zstyle ":completion:*" squeeze-slashes "true" - zstyle ":completion::*" use-cache "true" - zstyle ":completion::*" cache-path "$zdump" - - unsetopt beep - unsetopt hist_beep - unsetopt ignore_braces - unsetopt list_beep - setopt always_to_end - setopt prompt_subst - setopt share_history - - # clear backbuffer with ctrl-l - function clear-screen-and-scrollback() { - echoti civis >"$TTY" - printf '%b' '\e[H\e[2J' >"$TTY" - zle .reset-prompt - zle -R - printf '%b' '\e[3J' >"$TTY" - echoti cnorm >"$TTY" - } - - zle -N clear-screen-and-scrollback - bindkey '^L' clear-screen-and-scrollback - ''; - history = { - expireDuplicatesFirst = true; - path = "${config.xdg.stateHome}/zsh/zsh_history"; - save = 1000; - size = 100; - }; - plugins = [ - # { - # name = "powerlevel10k"; - # src = pkgs.zsh-powerlevel10k; - # file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - # } - - { - name = "zsh-completions"; - src = pkgs.zsh-completions; - file = "share/zsh-completions/zsh-completions.plugin.zsh"; - } - - { - name = "cattppuccin-zsh-syntax-highlighting"; - src = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "zsh-syntax-highlighting"; - rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea"; - sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo="; - }; - - file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"; - } - - # { - # name = "powerlevel10k-config"; - # src = ./files; - # file = ".p10k.zsh"; - # } - ]; - enableSyntaxHighlighting = true; - }; -} -- cgit v1.2.3