set bash and zsh prompts in system config

This commit is contained in:
willemml 2023-03-15 15:15:16 -07:00
parent 1f222efc4a
commit 740e88b606
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
2 changed files with 15 additions and 7 deletions

View file

@ -2,6 +2,7 @@
{
environment.pathsToLink = [ "/share/zsh" ];
environment.shells = [ pkgs.bashInteractive pkgs.zsh ];
environment.systemPackages = [ pkgs.coreutils-full ];
environment.variables.LANG = "en_US.UTF-8";
environment.variables.LANGUAGE = "en_US.UTF-8";
@ -18,13 +19,24 @@
settings.trusted-users = [ "root" "willem" ];
};
programs.nix-index.enable = false;
programs.bash.enable = true;
programs.bash.enableCompletion = true;
programs.bash.interactiveShellInit = ''
export PS1=$'\n'"\e[0mbash: \e[34;1m\w"$'\n'"\e[32m\\$\e[0m "
'';
programs.man.enable = true;
programs.zsh.enable = true;
programs.zsh.enableBashCompletion = true;
programs.zsh.promptInit = ''
autoload -U promptinit && promptinit
export PROMPT=$'\n'"%B%F{blue}%3~"$'\n'"%F{green}%(!.#.$) %f%b"
export RPROMPT="%B%F{red}%*%f%b"
'';
time.timeZone = "America/Vancouver";
users.users.willem.shell = pkgs.zsh;
}

View file

@ -34,10 +34,6 @@
};
};
programs.bash.enable = true;
programs.man.enable = true;
programs.zsh.loginShellInit = ''
reexec() {
unset __NIX_DARWIN_SET_ENVIRONMENT_DONE