configuration.nix/modules/nixos/starship.nix
Jalil David Salamé Messina d9cca60882
All checks were successful
/ check (push) Successful in 9s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Successful in 14s
/ build-vm (push) Successful in 20s
/ report-size (push) Successful in 1m9s
refactor(starship): move config to a JSON file
Should be faster to import than trying to parse the nix exprs.
2025-04-21 22:54:39 +02:00

30 lines
822 B
Nix

{ pkgs, lib, ... }@args:
let
cfg = args.config.jconfig;
in
{
config = lib.mkIf cfg.enable {
programs.starship = {
enable = true;
settings = lib.mkMerge [
{
format = "$time$all";
add_newline = false;
cmd_duration.min_time = 500;
cmd_duration.show_milliseconds = true;
time.disabled = false;
status = {
format = "[$signal_name$common_meaning$maybe_int](red)";
symbol = "[](bold red)";
disabled = false;
};
sudo.disabled = false;
}
# Add nerdfont symbols
(lib.mkIf cfg.styling.enable (lib.importJSON ./starship/symbols.json))
# Remove the `in`s and `on`s from the prompt
(lib.importJSON ./starship/short-text.json)
];
};
};
}