mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
nix: add envrc and envrc-nvidia file for auto dev env setup with direnv
This commit is contained in:
parent
3c7d682361
commit
bb1a481d1d
1
.gitignore
vendored
1
.gitignore
vendored
@ -42,6 +42,7 @@ userdata
|
|||||||
*.sqlite-shm
|
*.sqlite-shm
|
||||||
|
|
||||||
# direnv
|
# direnv
|
||||||
|
/.direnv
|
||||||
/.envrc
|
/.envrc
|
||||||
*.bat
|
*.bat
|
||||||
|
|
||||||
|
@ -8,6 +8,13 @@ It is recommended that you enter the dev shell before starting to build using `n
|
|||||||
since it will setup a Cachix cache for you. (you can configure this for your user's `nix.conf` by running `cachix use veloren-nix` once in the dev shell,
|
since it will setup a Cachix cache for you. (you can configure this for your user's `nix.conf` by running `cachix use veloren-nix` once in the dev shell,
|
||||||
which will make the cache available when you run commands outside of the dev shell).
|
which will make the cache available when you run commands outside of the dev shell).
|
||||||
|
|
||||||
|
If you have [direnv](https://direnv.net) setup on your system, it is also recommended to copy the `envrc`
|
||||||
|
(or `envrc-nvidia`, if you have an Nvidia GPU) file to the root of the repository as `.envrc`:
|
||||||
|
```shell
|
||||||
|
cp nix/envrc .envrc
|
||||||
|
```
|
||||||
|
This will make your env have the dev env setup automatically.
|
||||||
|
|
||||||
To build and install Voxygen and the server CLI into user profile, run:
|
To build and install Voxygen and the server CLI into user profile, run:
|
||||||
```shell
|
```shell
|
||||||
nix-env -f nix/default.nix -i
|
nix-env -f nix/default.nix -i
|
||||||
|
4
nix/envrc-common
Normal file
4
nix/envrc-common
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
watch_file nix/shell.nix
|
||||||
|
watch_file nix/common.nix
|
||||||
|
watch_file nix/sources.nix
|
||||||
|
watch_file nix/sources.json
|
2
nix/envrc-nvidia
Normal file
2
nix/envrc-nvidia
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
source_env nix/envrc-common
|
||||||
|
use nix nix/shell.nix --arg nvidia true
|
Loading…
Reference in New Issue
Block a user