Skip to content

Commit

Permalink
update flake and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eureka-cpu committed Jul 23, 2024
1 parent 300aa12 commit 3011793
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 924 deletions.
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

A Nix flake for the Versatus Labs ecosystem which provides reproducible build guarantees for Versatus
binaries, [development environments](#development-shells) for building Versatus repositories on [supported systems](#supported-systems)
and [NixOS images & infrastructure for deploying Versatus services](./deployments/README.md).
and [NixOS images & infrastructure for deploying Versatus services](./nixos/modules/deployments/README.md).

This flake is the core infrastructure for Versatus repositories. It contains a `lib` attribute with
functions for crafting toolchains, modules and virtualisation tools for creating NixOS configurations
and local virtual environments, templates, with robust tooling, for managing projects, and more.

## Prerequisites

Expand All @@ -12,7 +16,7 @@ To get started, choose an installation type at https://nixos.org/download. MacOS
**For MacOS users**, the graphical installer made available by Determinate Systems has some advantages and is recommended over the official installer, which are explained and can be found here: https://determinate.systems/posts/graphical-nix-installer.

Additionally, MacOS users may want to enable the `nix-darwin` module features in order to run linux virtual machines locally, otherwise this step may be skipped.
The [deployment guide](./deployments/README.md#nixos-vm-darwin) has a detailed walkthrough with examples and trouble shooting for getting started with the `nix-darwin` `linux-builder` feature.
The [deployment guide](./nixos/modules/deployments/README.md#nixos-vm-darwin) has a detailed walkthrough with examples and trouble shooting for getting started with the `nix-darwin` `linux-builder` feature.

### Nixpkgs

Expand All @@ -33,9 +37,9 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ];

First, ensure your system is listed under [Supported Systems](#supported-systems).

To enter a temporary [development shell](#development-shells) with `nix develop`:
Then enter a temporary development shell with `nix develop`:
```sh
nix develop .#<development-shell>
nix develop
```

### Supported Systems
Expand All @@ -46,18 +50,22 @@ nix develop .#<development-shell>
- aarch64-darwin
> Note: The Determinate Systems Nix installer also supports WSL.
### Development Shells

- `.#nix-dev` - tools necessary for building & maintaining the `versatus.nix` flake
- `.#protocol-dev` - tools necessary for building the Versatus protocol
- `.#lasr-dev` - tools necessary for building the Versatus LASR protocol
- `.#versa-rs` - Rust language tools for building the `versatus-rust` quickstart kit
- `.#versa-hs` - Haskell language tools for building the `versatus-haskell` quickstart kit

> Note: Coming soon:
- `.#compute-dev` - tools necessary for building the Versatus compute stack (for now this is part of protocol-dev)
- `.#versa-py` - Python language tools for building the `versatus-python` quickstart kit
- `.#versa-js` - JavaScript language tools for building the `versatus-javascript` quickstart kit
- `.#versa-c` - C language tools for building the `versatus-c` quickstart kit
- `.#versa-cpp` - C++ language tools for building the `versatus-cpp` quickstart kit
- `.#versa-go` - Go language tools for building the `versatus-go` quickstart kit
### Available Toolchain Functions

- `mkRustToolchainFromTOML`:
Given the path to a `rust-toolchain.toml`, produces the derivation
for that toolchain for linux and darwin systems.
Useful for rust projects that declare a `rust-toolchain.toml`.
- `mkHaskellToolchain`:
Takes nixpkgs as input, provides common haskell tools and automatically
resolves paths. Includes LD_LIBRARY_PATH environment variable.

> Note: The following functions will be created as time allows.
> If a toolchain you would like to see isn't present please feel free to file an issue
> and follow it up with a Pull Request.
- `mkJsToolchain`
- `mkGoToolchain`
- `mkPythonToolchain`
- `mkClangToolchain`
- `mkCppToolchain`
57 changes: 1 addition & 56 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3011793

Please sign in to comment.