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, ...}:
|
{ 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user