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

21 lines
492 B
Nix
Raw Normal View History

2023-03-27 17:32:26 -07:00
{
config,
lib,
...
2024-11-02 19:39:55 -07:00
}:
let
inherit (config.rose-pine) sources;
cfg = config.programs.starship.rose-pine;
enable = cfg.enable && config.programs.starship.enable;
2024-11-02 19:39:55 -07:00
themeName = if (cfg.flavor == "main") then "rose-pine" else "rose-pine-${cfg.flavor}";
in
{
options.programs.starship.rose-pine = lib.rp.mkRosePineOpt { name = "starship"; };
2023-03-27 17:32:26 -07:00
2024-05-21 14:53:46 -07:00
config.programs.starship.settings = lib.mkIf enable (
2024-11-02 19:39:55 -07:00
lib.mkDefault (lib.importTOML "${sources.starship}/${themeName}.toml")
2024-05-21 14:53:46 -07:00
);
2023-03-27 17:32:26 -07:00
}