You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.8 KiB
Nix
80 lines
1.8 KiB
Nix
{
|
|
description = "Vibed — mono-repo of self-contained HTTP web services";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nbd.url = "path:./nbd";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, rust-overlay, nbd }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
|
|
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
|
extensions = [ "rust-src" "rust-analyzer" "clippy" "rustfmt" ];
|
|
targets = [ "wasm32-unknown-unknown" ];
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
# Rust
|
|
rustToolchain
|
|
|
|
# Frontend
|
|
pkgs.trunk
|
|
pkgs.wasm-bindgen-cli
|
|
|
|
# Database
|
|
pkgs.sqlx-cli
|
|
pkgs.turso-cli
|
|
|
|
# Infrastructure
|
|
pkgs.opentofu
|
|
|
|
# Cloudflare
|
|
pkgs.wrangler
|
|
pkgs.worker-build
|
|
|
|
# General
|
|
pkgs.pkg-config
|
|
pkgs.openssl
|
|
|
|
# jq for json parsing
|
|
pkgs.jq
|
|
|
|
# NBD task management
|
|
nbd.packages.${system}.nbd
|
|
|
|
# MCP servers
|
|
pkgs.nodejs
|
|
|
|
# OpenAPI Linter
|
|
pkgs.redocly
|
|
|
|
# Build book
|
|
pkgs.mdbook
|
|
|
|
pkgs.just
|
|
];
|
|
|
|
shellHook = ''
|
|
echo "vibed dev shell loaded"
|
|
echo "rust : $(rustc --version)"
|
|
echo "trunk : $(trunk --version)"
|
|
echo "tofu : $(tofu --version | head -1)"
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|