diff options
author | Franck Cuny <franck@fcuny.net> | 2022-03-25 17:19:40 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-03-25 17:20:05 -0700 |
commit | e6852f1cd8fd10c2f06b553f5626e3fc9bd99561 (patch) | |
tree | 4fc304ff272fee18e14724f0456c63c593da0aa8 | |
parent | docs: add more documentation! (diff) | |
download | world-e6852f1cd8fd10c2f06b553f5626e3fc9bd99561.tar.gz |
shell: switch from zsh to fish
why not ?
-rw-r--r-- | hosts/common/system/default.nix | 4 | ||||
-rw-r--r-- | hosts/common/system/users.nix | 2 | ||||
-rw-r--r-- | users/fcuny/cli/default.nix | 2 | ||||
-rw-r--r-- | users/fcuny/cli/shell.nix | 10 | ||||
-rw-r--r-- | users/fcuny/cli/zsh.nix | 49 |
5 files changed, 14 insertions, 53 deletions
diff --git a/hosts/common/system/default.nix b/hosts/common/system/default.nix index 7d8fe9b..f519766 100644 --- a/hosts/common/system/default.nix +++ b/hosts/common/system/default.nix @@ -1,4 +1,4 @@ -{pkgs, ... }: +{ pkgs, ... }: { imports = [ @@ -19,5 +19,5 @@ }; # It's always useful to have bash around - environment.shells = [ pkgs.bashInteractive pkgs.zsh ]; + environment.shells = [ pkgs.bashInteractive pkgs.zsh pkgs.fish ]; } diff --git a/hosts/common/system/users.nix b/hosts/common/system/users.nix index 95c9027..3b4dfaa 100644 --- a/hosts/common/system/users.nix +++ b/hosts/common/system/users.nix @@ -11,7 +11,7 @@ uid = 1000; group = "fcuny"; home = "/home/fcuny"; - shell = pkgs.zsh; + shell = pkgs.fish; extraGroups = [ "users" "wheel" ]; hashedPassword = "$6$i.z1brxtb44JAEco$fDD2Izl.zRR9vBCB2VBKPScChGw38EEl7QEiBTJ/EwgP3oSL0X3ZHq0PJ.RtqzBsWTPUjl4F3MKOBMhnaAPr6."; diff --git a/users/fcuny/cli/default.nix b/users/fcuny/cli/default.nix index 093686e..0a35288 100644 --- a/users/fcuny/cli/default.nix +++ b/users/fcuny/cli/default.nix @@ -2,7 +2,7 @@ { imports = - [ ./backups.nix ./git.nix ./ssh.nix ./tmux.nix ./yt-dlp.nix ./zsh.nix ]; + [ ./backups.nix ./git.nix ./ssh.nix ./tmux.nix ./yt-dlp.nix ./shell.nix ]; home.packages = [ pkgs.gcc pkgs.gnumake pkgs.jq pkgs.ripgrep ]; } diff --git a/users/fcuny/cli/shell.nix b/users/fcuny/cli/shell.nix new file mode 100644 index 0000000..0e6a790 --- /dev/null +++ b/users/fcuny/cli/shell.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + programs.fish = { + enable = true; + interactiveShellInit = '' + set fish_greeting + ''; + }; +} diff --git a/users/fcuny/cli/zsh.nix b/users/fcuny/cli/zsh.nix deleted file mode 100644 index a27a3c1..0000000 --- a/users/fcuny/cli/zsh.nix +++ /dev/null @@ -1,49 +0,0 @@ -{config, lib, pkgs, ...}: - -{ - - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableCompletion = true; - defaultKeymap = "emacs"; - history = { - save = 100000; - extended = true; - ignoreDups = true; - }; - - initExtraFirst = '' - # Activate home-manager environment, if not already enabled - [ -d "$HOME/.nix-profile" ] || /nix/var/nix/profiles/per-user/$USER/home-manager/activate &> /dev/null - ''; - - initExtra = '' - # Print timing statistics for everything which takes longer than 5 seconds of - # user + system time ('sleep 6' does not work because of 0% user/system time!). - REPORTTIME=5 - - autoload -U colors && colors - - autoload -Uz vcs_info add-zsh-hook - setopt prompt_subst - - add-zsh-hook precmd vcs_info - - # Enable checking for (un)staged changes, enabling use of %u and %c - zstyle ':vcs_info:*' check-for-changes true - - PROMPT='%K{cyan}%F{black}%m%k%f %~%F{red}$vcs_info_msg_0_%f %# ' - - # man zshall /forward-word /backward-word - word splitting as with bash - WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' - - # For tramp (emacs). - if [ "$TERM" = "dumb" ]; then - unset PROMPT - PS1='$ ' - unsetopt zle - fi - ''; - }; -} |