2015-08-23 00:48:35 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
mainUser = config.krebs.build.user.name;
|
|
|
|
in
|
|
|
|
{
|
2015-12-15 14:33:34 +00:00
|
|
|
programs.zsh= {
|
|
|
|
enable = true;
|
2018-12-31 09:08:11 +00:00
|
|
|
enableCompletion = false; #manually at the end
|
2015-12-15 14:33:34 +00:00
|
|
|
|
|
|
|
promptInit = ''
|
|
|
|
RPROMPT=""
|
|
|
|
autoload colors && colors
|
|
|
|
case $UID in
|
|
|
|
0) PROMPT="%{$fg[red]%}%~%{$reset_color%} " ;;
|
|
|
|
9001) PROMPT="%{$fg[green]%}%~%{$reset_color%} " ;;
|
|
|
|
*) PROMPT="%{$fg[yellow]%}%n %{$fg[green]%}%~%{$reset_color%} " ;;
|
|
|
|
esac
|
|
|
|
if test -n "$SSH_CLIENT"; then
|
|
|
|
PROMPT="%{$fg[magenta]%}%m $PROMPT"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
2017-05-19 09:53:44 +00:00
|
|
|
|
2018-12-31 09:08:11 +00:00
|
|
|
users.users.${mainUser} = {
|
|
|
|
shell = "/run/current-system/sw/bin/zsh";
|
|
|
|
packages = [ pkgs.nix-zsh-completions ];
|
|
|
|
};
|
2015-08-23 00:48:35 +00:00
|
|
|
}
|