1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 20:41:47 +02:00

Remove environment variables doc

This commit is contained in:
Luc Perkins 2025-03-05 16:35:55 -03:00
parent af23843434
commit be9fbb04bb
No known key found for this signature in database
GPG key ID: C86EE5D85EE4DDA5
3 changed files with 7 additions and 65 deletions

View file

@ -11,7 +11,6 @@
- [Building Nix from Source](installation/building-source.md) - [Building Nix from Source](installation/building-source.md)
- [Using Nix within Docker](installation/installing-docker.md) - [Using Nix within Docker](installation/installing-docker.md)
- [Security](installation/nix-security.md) - [Security](installation/nix-security.md)
- [Environment Variables](installation/env-variables.md)
- [Upgrading Nix](installation/upgrading.md) - [Upgrading Nix](installation/upgrading.md)
- [Uninstalling Nix](installation/uninstall.md) - [Uninstalling Nix](installation/uninstall.md)
- [Nix Store](store/index.md) - [Nix Store](store/index.md)

View file

@ -1,62 +0,0 @@
# Environment Variables
To use Nix, some environment variables should be set. In particular,
`PATH` should contain the directories `prefix/bin` and
`~/.nix-profile/bin`. The first directory contains the Nix tools
themselves, while `~/.nix-profile` is a symbolic link to the current
*user environment* (an automatically generated package consisting of
symlinks to installed packages). The simplest way to set the required
environment variables is to include the file
`prefix/etc/profile.d/nix.sh` in your `~/.profile` (or similar), like
this:
```bash
source prefix/etc/profile.d/nix.sh
```
# `NIX_SSL_CERT_FILE`
If you need to specify a custom certificate bundle to account for an
HTTPS-intercepting man in the middle proxy, you must specify the path to
the certificate bundle in the environment variable `NIX_SSL_CERT_FILE`.
If you don't specify a `NIX_SSL_CERT_FILE` manually, Nix will install
and use its own certificate bundle.
Set the environment variable and install Nix
```console
$ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
$ curl -L https://nixos.org/nix/install | sh
```
In the shell profile and rc files (for example, `/etc/bashrc`,
`/etc/zshrc`), add the following line:
```bash
export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
```
> **Note**
>
> You must not add the export and then do the install, as the Nix
> installer will detect the presence of Nix configuration, and abort.
If you use the Nix daemon, you should also add the following to
`/etc/nix/nix.conf`:
```
ssl-cert-file = /etc/ssl/my-certificate-bundle.crt
```
## Proxy Environment Variables
The Nix installer has special handling for these proxy-related
environment variables: `http_proxy`, `https_proxy`, `ftp_proxy`,
`all_proxy`, `no_proxy`, `HTTP_PROXY`, `HTTPS_PROXY`, `FTP_PROXY`,
`ALL_PROXY`, `NO_PROXY`.
If any of these variables are set when running the Nix installer, then
the installer will create an override file at
`/etc/systemd/system/nix-daemon.service.d/override.conf` so `nix-daemon`
will use them.

View file

@ -3,10 +3,13 @@
This chapter is for impatient people who don't like reading documentation. This chapter is for impatient people who don't like reading documentation.
For more in-depth information you are kindly referred to subsequent chapters. For more in-depth information you are kindly referred to subsequent chapters.
1. Install Nix: 1. Install Nix.
We recommend that macOS users use [Determinate.pkg][pkg].
For Linux and Windows Subsystem for Linux (WSL) users:
```console ```console
$ curl -L https://nixos.org/nix/install | sh $ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --determinate
``` ```
The install script will use `sudo`, so make sure you have sufficient rights. The install script will use `sudo`, so make sure you have sufficient rights.
@ -41,3 +44,5 @@ For more in-depth information you are kindly referred to subsequent chapters.
```console ```console
$ nix-collect-garbage $ nix-collect-garbage
``` ```
[pkg]: https://install.determinate.systems/determinate-pkg/stable/Universal