zsh/starship: fix init

This commit is contained in:
Colin 2023-07-18 02:17:44 +00:00
parent 23e95ba2ba
commit 1709f64a69

View File

@ -1,13 +1,18 @@
# starship prompt: <https://starship.rs/config/#prompt>
{ config, lib, pkgs, ...}: { config, lib, pkgs, ...}:
let let
# starship prompt: <https://starship.rs/config/#prompt> enabled = config.sane.zsh.starship;
# populate ~/.config/starship.toml to customize toml = pkgs.formats.toml {};
starship-init = ''
eval "$(${pkgs.starship}/bin/starship init zsh)"
'';
in { in {
config = lib.mkIf config.sane.zsh.starship { config = lib.mkIf config.sane.zsh.starship {
programs.zsh.interactiveShellInit = starship-init; sane.programs.zsh = lib.mkIf enabled {
fs.".config/zsh/.zshrc".symlink.text = ''
eval "$(${pkgs.starship}/bin/starship init zsh)"
'';
fs.".config/starship.toml".symlink.target = toml.generate "starship.toml" {
format = "$all";
};
};
}; };
} }