diff --git a/hosts/common/programs/zsh/starship.nix b/hosts/common/programs/zsh/starship.nix index 79ef0fcc..dd1a76db 100644 --- a/hosts/common/programs/zsh/starship.nix +++ b/hosts/common/programs/zsh/starship.nix @@ -1,13 +1,18 @@ +# starship prompt: { config, lib, pkgs, ...}: let - # starship 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"; + }; + }; }; }