If you’d like to see native Starship support for the nix language, I’ve submitted a feature request to Starship. Please pop by and give it a thumbs up if this is something you’d like to see. Thanks!
opened 03:24PM - 21 Mar 26 UTC
✨ enhancement
## Feature Request
#### Is your feature request related to a problem? Please de… scribe.
Starship has language modules for many languages (Rust, Go, Python, Node.js, etc.) that detect project files and display the installed language version. However, there is no equivalent module for the **Nix expression language**.
Currently, when working in a directory with `.nix` files (like `flake.nix`, `default.nix`, `shell.nix`), there's no indication that this is a Nix project or what version of Nix is installed.
The existing `nix_shell` module only activates when inside a `nix-shell` or `nix develop` environment—it does not detect Nix projects themselves.
#### Describe the solution you'd like
A new `nix` module similar to other language modules, with configuration like:
```
[nix]
symbol = "❄️ "
style = "bold blue"
format = "via [$symbol($version )]($style)"
detect_extensions = ["nix"]
detect_files = ["flake.nix", "default.nix", "shell.nix", "flake.lock"]
detect_folders = []
```
The module would:
- Detect directories containing `.nix` files or common Nix project files (`flake.nix`, `default.nix`, `shell.nix`)
- Display the Nix version (from `nix --version`, e.g., `nix (Nix) 2.18.1`)
- Be configurable like other language modules
#### Describe alternatives you've considered
A custom module can be used as a workaround:
```
[custom.nix]
command = "nix --version | awk '{print $3}'"
detect_extensions = ["nix"]
detect_files = ["flake.nix", "default.nix", "shell.nix"]
symbol = "❄️ "
format = "[$symbol($output )]($style)"
style = "bold blue"
```
However, a built-in module would be more efficient, consistent with other language modules, and wouldn't require users to configure a custom module.
### Additional context
Nix is a growing ecosystem with NixOS, nix-darwin, home-manager, and flakes becoming increasingly popular. Having first-class support in starship would benefit many users who work with Nix configurations daily.
1 Like