zsh/starship: fix init
This commit is contained in:
parent
23e95ba2ba
commit
1709f64a69
|
@ -1,13 +1,18 @@
|
|||
# starship prompt: <https://starship.rs/config/#prompt>
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
let
|
||||
# starship prompt: <https://starship.rs/config/#prompt>
|
||||
# populate ~/.config/starship.toml to customize
|
||||
starship-init = ''
|
||||
eval "$(${pkgs.starship}/bin/starship init zsh)"
|
||||
'';
|
||||
enabled = config.sane.zsh.starship;
|
||||
toml = pkgs.formats.toml {};
|
||||
in {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user