chore: separate backend from frontend
Some checks failed
Publish Docker Images / build-and-publish (push) Has been cancelled

This commit is contained in:
2025-11-15 12:46:24 +01:00
parent 9f1d4db0de
commit e5f94b9f8e
86 changed files with 134 additions and 14729 deletions

View File

@@ -1,7 +1,6 @@
{
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
systems.url = "github:nix-systems/default";
alejandra = {
url = "github:kamadorueda/alejandra/4.0.0";
inputs.nixpkgs.follows = "nixpkgs";
@@ -14,6 +13,10 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
};
nixConfig = {
@@ -30,27 +33,26 @@
outputs = {
self,
nixpkgs,
devenv,
systems,
flake-utils,
rust-overlay,
alejandra,
...
} @ inputs: let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in {
formatter = forEachSystem (system: alejandra.defaultPackage.${system});
packages = forEachSystem (system: import ./backend/nix/package.nix { inherit rust-overlay inputs system; });
devShells = forEachSystem (
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
backend = import ./backend/nix/shell.nix {
inherit inputs pkgs system self rust-overlay;
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {inherit system overlays;};
rustVersion = pkgs.rust-bin.stable.latest.default;
rustPlatform = pkgs.makeRustPlatform {
cargo = rustVersion;
rustc = rustVersion;
};
frontend = import ./frontend/shell.nix {
inherit inputs pkgs self;
in {
formatter = alejandra.defaultPackage.${system};
packages = import ./nix/package.nix {inherit pkgs rustPlatform;};
devShell = import ./nix/shell.nix {
inherit inputs pkgs self rustVersion;
};
}
);
};
}