nix-stuff/roles/common/programs/starship.nix

34 lines
779 B
Nix

{ pkgs, ... }:
let
catppuccinFlavour = "mocha";
catppuccinStarship = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "starship";
# Latest commit is 5629d2356f62a9f2f8efad3ff37476c19969bd4f
rev = "main";
hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
} + /palettes/${catppuccinFlavour}.toml;
in
{
programs.starship = with builtins; {
enable = true;
settings = {
nix_shell = {
disabled = false;
heuristic = true;
symbol = " ";
};
os = {
disabled = false;
symbols.NixOS = " ";
};
directory = {
disabled = false;
read_only = " 󰌾";
};
palette = "catppuccin_${catppuccinFlavour}";
} //
# Add the catppuccin palette to the settings file
(fromTOML (readFile catppuccinStarship));
};
}