Some checks failed
Deploy / deploy (push) Failing after 1m43s
- Add docker.nix for Nix-based Docker image builds - Update flake.nix with dockerImage package output - Add output: standalone to next.config.ts for production builds - Add /metrics endpoint for Prometheus scraping - Add Gitea Actions workflow calling shared deploy-nomad.yaml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.7 KiB
Nix
58 lines
1.7 KiB
Nix
# ABOUTME: Nix flake for PhaseFlow development environment and Docker build.
|
|
# ABOUTME: Provides Node.js 24, pnpm, turbo, lefthook, and Docker image output.
|
|
{
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { nixpkgs, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
# Common packages for development
|
|
commonPackages = with pkgs; [
|
|
nodejs_24
|
|
pnpm
|
|
git
|
|
pocketbase
|
|
];
|
|
in {
|
|
# Docker image for production deployment
|
|
packages.${system} = {
|
|
dockerImage = import ./docker.nix { inherit pkgs; };
|
|
default = import ./docker.nix { inherit pkgs; };
|
|
};
|
|
|
|
devShells.${system} = {
|
|
# Default development shell with all tools
|
|
default = pkgs.mkShell {
|
|
packages = commonPackages ++ (with pkgs; [
|
|
turbo
|
|
lefthook
|
|
]);
|
|
|
|
# For native modules (sharp, better-sqlite3, etc.)
|
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ];
|
|
};
|
|
|
|
# Ralph sandbox shell with minimal permissions
|
|
# Used for autonomous Ralph loop execution
|
|
ralph = pkgs.mkShell {
|
|
packages = commonPackages ++ (with pkgs; [
|
|
# Claude CLI (assumes installed globally or via npm)
|
|
# Add any other tools Ralph needs here
|
|
]);
|
|
|
|
# Restrictive environment for sandboxed execution
|
|
shellHook = ''
|
|
echo "🔒 Ralph Sandbox Environment"
|
|
echo " Limited to: nodejs, pnpm, git"
|
|
echo ""
|
|
'';
|
|
|
|
# For native modules
|
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ];
|
|
};
|
|
};
|
|
};
|
|
}
|