2022-07-11 09:48:50 -04:00
|
|
|
# Contributing to nix.dev
|
|
|
|
|
2022-07-07 13:42:53 -04:00
|
|
|
nix.dev is a community effort to collect, create, and maintain world-class learning resources for Nix.
|
|
|
|
|
2024-04-09 05:47:04 -04:00
|
|
|
We strongly encourage everyone interested to participate:
|
|
|
|
- Make a [pull request](https://github.com/NixOS/nix.dev/pulls) if you want to introduce an incremental change.
|
|
|
|
- Open an [issue](https://github.com/NixOS/nix.dev/issues) if you want to discuss a significant change before starting to work on it.
|
2022-07-07 13:42:53 -04:00
|
|
|
|
2024-04-09 05:47:04 -04:00
|
|
|
Please read our [contributor guide](https://nix.dev/contributing/documentation) for more details.
|
2023-06-22 05:18:22 -04:00
|
|
|
|
2024-05-26 11:09:24 -04:00
|
|
|
## Local preview
|
|
|
|
|
|
|
|
Enter the development environment with `nix-shell`, or [set up direnv](https://nix.dev/guides/recipes/direnv.html)` and run `direnv allow`, and then:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
[nix-shell:nix.dev]$ devmode
|
|
|
|
```
|
|
|
|
|
|
|
|
and open a browser at <http://localhost:5500>.
|
|
|
|
|
|
|
|
As you make changes, your browser should auto-reload.
|
|
|
|
|
|
|
|
To manually test [redirects](./_redirects):
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
[nix-shell:nix.dev]$ nix-build -A build
|
|
|
|
[nix-shell:nix.dev]$ netlify dev -d result
|
|
|
|
```
|
|
|
|
|
2024-08-24 11:52:19 -04:00
|
|
|
## Building the reference manuals
|
|
|
|
|
|
|
|
By default nix.dev builds without the various versions of the Nix reference manual, as that takes quite a while due to how it's currently implemented.
|
|
|
|
To enable building the manuals:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
[nix-shell:nix.dev]$ nix-build -A build --arg withManuals true
|
|
|
|
[nix-shell:nix.dev]$ devmode --arg withManuals true
|
|
|
|
```
|
|
|
|
|
2023-11-02 15:37:11 -04:00
|
|
|
## Updating reference manuals
|
|
|
|
|
2024-04-09 05:47:04 -04:00
|
|
|
With the current setup, the [Nix manual hosted on nix.dev](https://nix.dev/reference/nix-manual) does not get updated automatically with new releases.
|
2023-11-02 15:37:11 -04:00
|
|
|
The following manual steps are required:
|
|
|
|
|
2024-03-17 01:52:26 -04:00
|
|
|
```shell-session
|
|
|
|
nix-shell --run update-nixpkgs-releases
|
|
|
|
nix-shell --run update-nix-releases
|
|
|
|
```
|