rose-pine-nix/modules/home-manager/starship.nix

20 lines
492 B
Nix

{
config,
lib,
...
}:
let
inherit (config.rose-pine) sources;
cfg = config.programs.starship.rose-pine;
enable = cfg.enable && config.programs.starship.enable;
themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}";
in
{
options.programs.starship.rose-pine = lib.rp.mkRosePineOpt { name = "starship"; };
config.programs.starship.settings = lib.mkIf enable (
lib.mkDefault (lib.importTOML "${sources.starship}/${themeName}.toml")
);
}