diff --git a/roles/common/programs/starship.nix b/roles/common/programs/starship.nix index 9c9cd3b..5b168b7 100644 --- a/roles/common/programs/starship.nix +++ b/roles/common/programs/starship.nix @@ -1,7 +1,16 @@ -{ config, ... }: - +{ 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 = { + programs.starship = with builtins; { enable = true; settings = { nix_shell = { @@ -17,6 +26,9 @@ disabled = false; read_only = " 󰌾"; }; - }; + palette = "catppuccin_${catppuccinFlavour}"; + } // + # Add the catppuccin palette to the settings file + (fromTOML (readFile catppuccinStarship)); }; }