shell: use starship for bash and zsh

This commit is contained in:
Timothy DeHerrera 2020-07-26 22:24:28 -06:00
parent 5d8413a85a
commit 6d64118e26
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122
4 changed files with 110 additions and 1 deletions

View file

@ -29,6 +29,13 @@ in {
whois
];
shellInit = ''
export STARSHIP_CONFIG=${
pkgs.writeText "starship.toml"
(fileContents ./develop/zsh/starship.toml)
}
'';
shellAliases =
let ifSudo = string: lib.mkIf config.security.sudo.enable string;
in {
@ -112,6 +119,10 @@ in {
};
programs.bash.promptInit = ''
eval "$(${pkgs.starship}/bin/starship init bash)"
'';
security = {
hideProcessInformation = true;

View file

@ -81,7 +81,7 @@ in {
];
promptInit = ''
source ${pkgs.purs}/share/zsh/plugins/purs/purs.zsh
eval "$(${pkgs.starship}/bin/starship init zsh)"
'';
interactiveShellInit = let

View file

@ -0,0 +1,97 @@
[character]
style_success = "purple"
[aws]
symbol = " "
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[cmd_duration]
disabled = true
[conda]
symbol = " "
[directory]
style = "cyan"
[docker]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[git_branch]
symbol = " "
style = "bold dimmed white"
[git_status]
conflicted = "䷅"
ahead.value = "⟫"
ahead.style = "green"
behind.value = "⟪"
behind.style = "red"
diverged = "🔀"
untracked.value = " ❓‍"
untracked.style = "purple"
stashed = "↪"
modified.value = ""
modified.style = "yellow"
staged.value = "𝚫 "
staged.style = "green"
prefix = "「"
suffix = "」"
renamed = "⇆"
deleted.value = "✘ "
deleted.style = "red"
style = "white"
[golang]
symbol = " "
[haskell]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[memory_usage]
symbol = " "
[nim]
symbol = " "
[nix_shell]
symbol = " "
pure_msg = ""
impure_msg = ""
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "

View file

@ -6,6 +6,7 @@ let
nix build ${configs}.niximg.config.system.build.isoImage $@
'';
in pkgs.mkShell {
name = "nixflk";
nativeBuildInputs = with pkgs; [ git git-crypt nixFlakes buildIso ];
shellHook = ''