rose-pine-nix/modules/home-manager/starship.nix
2024-05-21 22:53:46 +01:00

17 lines
504 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.starship.catppuccin;
enable = cfg.enable && config.programs.starship.enable;
in
{
options.programs.starship.catppuccin = lib.ctp.mkCatppuccinOpt "starship";
config.programs.starship.settings = lib.mkIf enable (
{
format = lib.mkDefault "$all";
palette = "catppuccin_${cfg.flavour}";
}
// builtins.fromTOML (builtins.readFile "${sources.starship}/palettes/${cfg.flavour}.toml")
);
}