diff --git a/profiles/core.nix b/profiles/core.nix index 3bac7f0e..4bbd3bed 100644 --- a/profiles/core.nix +++ b/profiles/core.nix @@ -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; diff --git a/profiles/develop/zsh/default.nix b/profiles/develop/zsh/default.nix index a82c73b4..bc101d7d 100644 --- a/profiles/develop/zsh/default.nix +++ b/profiles/develop/zsh/default.nix @@ -81,7 +81,7 @@ in { ]; promptInit = '' - source ${pkgs.purs}/share/zsh/plugins/purs/purs.zsh + eval "$(${pkgs.starship}/bin/starship init zsh)" ''; interactiveShellInit = let diff --git a/profiles/develop/zsh/starship.toml b/profiles/develop/zsh/starship.toml new file mode 100644 index 00000000..142879cb --- /dev/null +++ b/profiles/develop/zsh/starship.toml @@ -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 = " " diff --git a/shell.nix b/shell.nix index 884b5463..86be994d 100644 --- a/shell.nix +++ b/shell.nix @@ -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 = ''