starship: condition nushell integration on nushell 0.73+

Older versions are not supported: https://starship.rs/#nushell
This commit is contained in:
Naïm Favier 2023-03-17 13:48:06 +01:00
parent b832390db3
commit a3b90e5762
No known key found for this signature in database
GPG key ID: 95AFCE8211908325

View file

@ -80,6 +80,14 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [{
assertion = cfg.enableNushellIntegration
-> versionAtLeast config.programs.nushell.package.version "0.73";
message = ''
Nushell integration for starship requires nushell 0.73 or later.
'';
}];
home.packages = [ cfg.package ]; home.packages = [ cfg.package ];
xdg.configFile."starship.toml" = mkIf (cfg.settings != { }) { xdg.configFile."starship.toml" = mkIf (cfg.settings != { }) {