Open source Nest implementation
### Nidobyte

Server for hosting for your Pijul projects written in Rust.

### Installing

- Database is Postgresql, DATABASE_URL must be exposed as environment variable
- `ROCKET_SECRET_KEY` contains the cookie encryption key, and must be set too.
- `REPOSITORY_ROOT` will be used as storage root for repositories, and must be supplied

#### Development

This project uses nix to ensure dependencies are met and the development environments
are reproducable. Please install Nix by [following the install instructions]https://nixos.org/download.html.

When `nix-shell` is in your `$PATH`, execute: `nix-shell`. Nix will download and
manage dependencies for you. Nix will also start a postgresql server and initiate
the database.

To start the server run: `cargo run`.

##### Database migrations

This project uses `sqlx` to integrate with the database. Migrations are run when
Rocket lifts off (boots its runtime).

Generating a new migrations is done by running: `sqlx migrate add -r <description>`.
Note both an up and down migration are required.

#### Getting started with Pijul

* `pijul init` to start a repository
  * `rm -rf .git` if tooling already created a Git repository
* `mv .gitignore .ignore` to ignore local only files
* Set the author of patches for this machine by writing TOML:
```
[author]
name = "<alias or short name>"
full_name = "<full name>"
email = "<email address>"
```
  For MacOs write it to: `~/.pijulconfig`