docs(installation): add advanced installation (#1643)

Adds an "Advanced Installation" page to the documentation website.
This commit is contained in:
Dani 2021-01-06 00:05:03 +01:00 committed by GitHub
parent 550c09598d
commit d009db528d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 8 deletions

View File

@ -139,6 +139,9 @@
### Getting Started
**Note**: due to the proliferation of different platforms, only a subset of supported platforms are
shown below. Can't see yours? Have a look at the [extra platform instructions](https://starship.rs/installing/).
1. Install the **starship** binary:
#### Install Latest Version
@ -149,15 +152,9 @@
curl -fsSL https://starship.rs/install.sh | bash
```
##### From source on [crates.io](https://crates.io/):
```sh
cargo install starship
```
#### Install via Package Manager
##### With [Homebrew](https://brew.sh/):
##### Example: [Homebrew](https://brew.sh/):
```sh
brew install starship
@ -169,7 +166,7 @@
scoop install starship
```
1. Add the init script to your shell's config file:
2. Add the init script to your shell's config file:
#### Bash

View File

@ -90,6 +90,7 @@ module.exports = {
sidebar: [
"/",
["/guide/", "Guide"],
["/installing/", "Advanced Installation"],
["/config/", "Configuration"],
["/advanced-config/", "Advanced Configuration"],
["/faq/", "Frequently Asked Questions"],

52
docs/installing/README.md Normal file
View File

@ -0,0 +1,52 @@
# 🚀 Advanced Installation
To install starship, you need to do two things:
1. Get the **starship** binary onto your computer
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
For most users, the instructions on [the main page](/guide/#🚀-installation) will work great. However,
for some more specialized platforms, different instructions are needed.
There are so many platforms out there that they didn't fit into the main
README.md file, so here are some installation instructions for other platforms
from the community. Is yours not here? Please do add it here if you figure it
out!
## [Nix](https://nixos.wiki/wiki/Nix)
### Getting the Binary
#### Imperatively
```sh
nix-env -iA nixos.starship
```
#### Declarative, single user, via [home-manager](home-manager)
Add `pkgs.starship` to your `home.packages` in your `home.nix` file, then run
```sh
home-manager switch
```
#### Declarative, system-wide, with NixOS
Add `pkgs.starship` to `environment.packages` in your `configuration.nix`,
then run
```sh
sudo nixos-rebuild switch
```
### Modifying Init Scripts
#### With Nix and home-manager, using zsh:
Add the following to `programs.zsh.initExtra` in your `home.nix` file, then
run
```sh
home-manager switch
```