Sample nix Flake repository for a Rust application
Find a file
2025-02-19 00:08:36 +01:00
.vscode init hai 2025-02-19 00:08:36 +01:00
src init hai 2025-02-19 00:08:36 +01:00
.envrc Initial commit 2020-08-20 20:50:20 -04:00
.gitignore Initial commit 2020-08-20 20:50:20 -04:00
build.rs init hai 2025-02-19 00:08:36 +01:00
Cargo.lock init hai 2025-02-19 00:08:36 +01:00
Cargo.toml init hai 2025-02-19 00:08:36 +01:00
default.nix init hai 2025-02-19 00:08:36 +01:00
flake.lock init hai 2025-02-19 00:08:36 +01:00
flake.nix init hai 2025-02-19 00:08:36 +01:00
LICENSE init hai 2025-02-19 00:08:36 +01:00
README.md init hai 2025-02-19 00:08:36 +01:00
rosenpass-darkogo.svg init hai 2025-02-19 00:08:36 +01:00
shell.nix init hai 2025-02-19 00:08:36 +01:00

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 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

    $ 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

    $ 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.