Modularize programs and add starship

This commit is contained in:
DashieTM 2024-08-06 12:40:16 +02:00
parent 1a0064894d
commit 44ac35d6e2
24 changed files with 646 additions and 530 deletions

View file

@ -77,97 +77,6 @@
nssmdns4 = true;
openFirewall = true;
};
programs.starship =
let
base16 = pkgs.callPackage inputs.base16.lib { };
scheme = (base16.mkSchemeAttrs config.stylix.base16Scheme);
code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
in
{
enable = true;
interactiveOnly = true;
presets = [ "pastel-powerline" ];
settings =
{
# derived from https://starship.rs/presets/pastel-powerline
format = ''$username$directory$git_branch$git_status$git_metrics[ ](bg:none fg:prev_bg)'';
right_format = ''$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala$python$ocaml$opa$perl$zig$dart$dotnet$nix_shell$shell$solidity[](bg:prev_bg fg:#3465A4)$time$os'';
username = {
show_always = false;
style_user = "bg:#5277C3 fg:#${scheme.base05}";
style_root = "bg:#5277C3 fg:#${scheme.base05}";
format = "[ $user ]($style)[](bg:#3465A4 fg:#5277C3)";
disabled = false;
};
os = {
symbols = { NixOS = " "; };
style = "bg:#3465A4 fg:#${scheme.base05}";
disabled = false;
};
directory = {
style = "bg:#3465A4 fg:#${scheme.base05}";
format = "[ $path ]($style)";
truncation_length = 3;
truncation_symbol = "/";
};
git_branch = {
symbol = "";
style = "bg:#5256c3 fg:#${scheme.base05}";
format = "[ ](bg:#5256c3 fg:prev_bg)[$symbol $branch ]($style)";
};
git_status = {
staged = "+\${count} (fg:#C4A000)";
ahead = "\${count} (fg:#C4A000)";
diverged = "\${count} (fg:#C4A000)";
behind = "\${count} (fg:#C4A000)";
stashed = " ";
untracked = "?\${count} (fg:#C4A000)";
modified = "!\${count} (fg:#C4A000)";
deleted = "\${count} (fg:#C4A000)";
conflicted = "=\${count} (fg:#C4A000)";
renamed = "»\${count} (fg:#C4A000)";
style = "bg:#5256c3 fg:fg:#C4A000";
format = "[$all_status$ahead_behind]($style)";
};
git_metrics = {
disabled = false;
format = "([| ](bg:#5256c3)[+$added]($added_style bg:#5256c3)[ -$deleted]($deleted_style bg:#5256c3))";
};
c = { format = code_format; };
elixir = { format = code_format; };
elm = { format = code_format; };
golang = { format = code_format; };
gradle = { format = code_format; };
haskell = { format = code_format; };
java = { format = code_format; };
julia = { format = code_format; };
nodejs = { format = code_format; };
nim = { format = code_format; };
nix_shell = { symbol = ""; format = code_format; };
rust = { format = code_format; };
scala = { format = code_format; };
typst = { format = code_format; };
python = { format = code_format; };
ocaml = { format = code_format; };
opa = { format = code_format; };
perl = { format = code_format; };
zig = { format = code_format; };
dart = { format = code_format; };
dotnet = { format = code_format; };
# docker_context = {
# symbol = " ";
# style = "bg:#06969A";
# format = "[](bg:#06969A fg:prev_bg)[ $symbol $context ]($style)";
# };
time = {
disabled = false;
time_format = "%R"; # Hour:Minute Format
style = "bg:#3465A4 fg:#${scheme.base05}";
format = "[ $time ]($style)";
};
};
};
programs.fish.enable = true;
programs.fish.promptInit = ''