114 lines
3.2 KiB
Nix
114 lines
3.2 KiB
Nix
{ self, inputs, ... }: {
|
|
perSystem = { system, pkgs, lib, ... }: {
|
|
packages.starship = (inputs.wrappers.wrapperModules.starship.apply {
|
|
inherit pkgs;
|
|
settings = lib.recursiveUpdate (lib.importTOML (pkgs.fetchurl {
|
|
url = https://starship.rs/presets/toml/catppuccin-powerline.toml;
|
|
sha256 = "1jzbbzm3nwdlldq43aj3csp0ps23fsa6x2225z85l0s9qbj4cdy2";
|
|
})) {
|
|
palette = "catppuccin_mocha";
|
|
add_newline = true;
|
|
line_break.disabled = false;
|
|
git_status.diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
|
cmd_duration.format = " $duration";
|
|
cmd_duration.show_notifications = false;
|
|
hostname = {
|
|
disabled = false;
|
|
ssh_symbol = "🌐";
|
|
format = "[$ssh_symbol$hostname]($style)";
|
|
style = "bg:red fg:crust";
|
|
};
|
|
os.symbols.NixOS = " ";
|
|
format = lib.replaceStrings ["\n"] [""] ''
|
|
[](red)
|
|
$os
|
|
$username
|
|
$hostname
|
|
[](bg:peach fg:red)
|
|
$directory
|
|
[](bg:yellow fg:peach)
|
|
$git_branch
|
|
$git_status
|
|
[](fg:yellow bg:green)
|
|
$c
|
|
$rust
|
|
$golang
|
|
$nodejs
|
|
$php
|
|
$java
|
|
$kotlin
|
|
$haskell
|
|
$python
|
|
[](fg:green bg:sapphire)
|
|
$conda
|
|
[](fg:sapphire bg:lavender)
|
|
$time
|
|
[ ](fg:lavender)
|
|
$cmd_duration
|
|
$line_break
|
|
$character
|
|
'';
|
|
};
|
|
}).wrapper;
|
|
|
|
packages.starship-ascii = (inputs.wrappers.wrapperModules.starship.apply {
|
|
inherit pkgs;
|
|
settings = {
|
|
add_newline = false;
|
|
|
|
format = "$username$hostname$directory$git_branch$git_status$cmd_duration$line_break$character";
|
|
|
|
username = {
|
|
show_always = true;
|
|
format = "[$user]($style)";
|
|
style_user = "bold blue";
|
|
style_root = "bold red";
|
|
};
|
|
|
|
hostname = {
|
|
disabled = false;
|
|
ssh_only = false;
|
|
format = "[@$hostname]($style) ";
|
|
style = "bold blue";
|
|
};
|
|
|
|
directory = {
|
|
truncation_length = 3;
|
|
truncate_to_repo = true;
|
|
format = "[ in $path]($style) ";
|
|
style = "bold cyan";
|
|
};
|
|
|
|
git_branch = {
|
|
symbol = "on ";
|
|
format = "[$symbol$branch]($style) ";
|
|
style = "bold yellow";
|
|
};
|
|
|
|
git_status = {
|
|
format = "([$all_status$ahead_behind]($style) )";
|
|
style = "bold red";
|
|
ahead = "ahead:$count ";
|
|
behind = "behind:$count ";
|
|
diverged = "diverged:$ahead_count/$behind_count ";
|
|
up_to_date = "";
|
|
};
|
|
|
|
cmd_duration = {
|
|
min_time = 2000;
|
|
show_notifications = false;
|
|
format = "took [$duration]($style) ";
|
|
style = "bold green";
|
|
};
|
|
|
|
line_break.disabled = false;
|
|
|
|
character = {
|
|
success_symbol = "[\\$](bold green) ";
|
|
error_symbol = "[\\$](bold red) ";
|
|
vicmd_symbol = "[\\$](bold yellow) ";
|
|
};
|
|
};
|
|
}).wrapper;
|
|
};
|
|
} |