added cli parameter to toggle registraion, and split the monorepo: now this is only the backend

This commit is contained in:
2026-01-13 16:04:58 +01:00
parent 0e8ef49cfd
commit 86d86473af
11 changed files with 184 additions and 146 deletions

View File

@@ -1,5 +1,5 @@
{
description = "chatapp monorepo";
description = "Frangipane backend";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@@ -7,25 +7,35 @@
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { nixpkgs, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
nixpkgs,
flake-utils,
rust-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ rust-overlay.overlays.default ];
pkgs = import nixpkgs { inherit system overlays; };
rust = pkgs.rust-bin.stable.latest.default;
openssl = pkgs.openssl;
in {
in
{
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "chatapp";
pname = "frangipane";
version = "1.0.0";
# Point to the backend subdirectory
src = ./backend;
src = ./.;
cargoLock = {
lockFile = ./backend/Cargo.lock;
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ rust pkgs.pkg-config ];
nativeBuildInputs = [
rust
pkgs.pkg-config
];
buildInputs = [ openssl ];
OPENSSL_LIB_DIR = "${openssl.out}/lib";
@@ -34,11 +44,18 @@
};
devShells.default = pkgs.mkShell {
packages = [ rust pkgs.cargo pkgs.rust-analyzer pkgs.pkg-config openssl ];
packages = [
rust
pkgs.cargo
pkgs.rust-analyzer
pkgs.pkg-config
openssl
];
shellHook = ''
export OPENSSL_DIR=${openssl.dev}
export PKG_CONFIG_PATH=${openssl.dev}/lib/pkgconfig
'';
};
});
}
);
}