chore: separate frontend from backend

This commit is contained in:
2025-11-13 23:28:01 +01:00
parent 9f1d4db0de
commit 0850072159
91 changed files with 429 additions and 6985 deletions

View File

@@ -1,7 +1,7 @@
{
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
systems.url = "github:nix-systems/default";
flake-utils.url = "github:numtide/flake-utils";
alejandra = {
url = "github:kamadorueda/alejandra/4.0.0";
inputs.nixpkgs.follows = "nixpkgs";
@@ -10,10 +10,6 @@
url = "github:cachix/devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixConfig = {
@@ -30,27 +26,32 @@
outputs = {
self,
nixpkgs,
devenv,
systems,
rust-overlay,
alejandra,
flake-utils,
...
} @ 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 (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
backend = import ./backend/nix/shell.nix {
inherit inputs pkgs system self rust-overlay;
};
frontend = import ./frontend/shell.nix {
inherit inputs pkgs self;
};
}
);
};
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = alejandra.defaultPackage.${system};
devShell = import ./nix/shell.nix {
inherit inputs pkgs self;
};
}
);
# let
# forEachSystem = nixpkgs.lib.genAttrs (import systems);
# in {
# formatter = forEachSystem (system: alejandra.defaultPackage.${system});
# devShells = forEachSystem (
# system: let
# pkgs = nixpkgs.legacyPackages.${system};
# in {
# frontend = import ./nix/shell.nix {
# inherit inputs pkgs self;
# };
# }
# );
# };
}