hai/README.md
2025-02-19 00:08:36 +01:00

46 lines
1.4 KiB
Markdown

# Hai Wireguard Oauth VPN
This is a stub repository to try to develop a Rosenpass Wireguard VPN with Oauth second factor authentification.
## Getting started
1. Install [direnv](https://github.com/direnv/direnv) on your system by following the instructions
provided on the project page.
**Important**: you can skip this step if you do not intend to use direnv as it's optional.
`direnv` is a tool that setups your shell with the required environment variables (and tools in
the case of Nix) to hack on!
2. Clone the project
``` console
$ git clone git@forge.versia.pub:aprl/hai
Cloning into 'hai'...
direnv: error .envrc is blocked.
```
If you have `direnv` installed and configured for your shell you will see the following error message:
```
direnv: error /path/hai/.envrc is blocked.
Run `direnv allow` to approve its content
```
3. If you installed `direnv` then allow `direnv` to setup your shell with the required dependencies to develop
``` console
$ direnv allow
direnv: loading /path/hai/.envrc
direnv: using flake
```
## Development
Use `nix shell` to spawn a shell with `cargo` and all necessary dependencies.
Within this shell you can use `cargo` commands as you normally would.
If your project requires external dependencies (outside of `crates.io`) then use `nix run '.#'`
to build and run your project.