/ flake.nix
flake.nix
1 { 2 # :: "// straylight // aleph // build system" 3 description = "// straylight // aleph // build system"; 4 # :: { buck2-prelude : { flake : Bool, url : "github:weyl-ai/straylight-buck2-prelude" }, ghc-source-gen-src : { flake : Bool, url : "github:google/ghc-source-gen" }, llvm-project : { flake : Bool, url : "github:llvm/llvm-project/bb1f220d534b0f6d80bea36662f5188ff11c2e54" }, nimi : { url : "github:b7r6/nimi/add-static-build" }, nix2gpu : { url : "github:fleek-sh/nix2gpu" } } 5 6 inputs = { 7 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 8 systems.url = "github:nix-systems/default"; 9 flake-parts.url = "github:hercules-ci/flake-parts"; 10 treefmt-nix.url = "github:numtide/treefmt-nix"; 11 # :: { flake : Bool, url : "github:llvm/llvm-project/bb1f220d534b0f6d80bea36662f5188ff11c2e54" } 12 # :: "github:llvm/llvm-project/bb1f220d534b0f6d80bea36662f5188ff11c2e54" 13 # :: Bool 14 ndg.url = "github:feel-co/ndg"; 15 16 llvm-project = { 17 url = "github:llvm/llvm-project/bb1f220d534b0f6d80bea36662f5188ff11c2e54"; 18 flake = false; 19 }; 20 21 # Determinate Nix with WASM support (builtins.wasm + wasm32-wasip1) 22 # :: { flake : Bool, url : "github:google/ghc-source-gen" } 23 # :: "github:google/ghc-source-gen" 24 # :: Bool 25 # NOTE: Don't follow nixpkgs - needs specific rust version for wasmtime 26 nix.url = "github:straylight-software/nix"; 27 28 # ghc-source-gen from git (Hackage version doesn't support GHC 9.12) 29 # :: { flake : Bool, url : "github:weyl-ai/straylight-buck2-prelude" } 30 # :: "github:weyl-ai/straylight-buck2-prelude" 31 # :: Bool 32 # Required for grapesy -> proto-lens-protoc -> ghc-source-gen 33 ghc-source-gen-src = { 34 url = "github:google/ghc-source-gen"; 35 flake = false; 36 }; 37 38 # Buck2 prelude (straylight fork with NVIDIA support) 39 # Mercury-based Haskell rules, LLVM 22 C++ toolchain, nv target compilation 40 # :: { url : "github:fleek-sh/nix2gpu" } 41 # :: "github:fleek-sh/nix2gpu" 42 buck2-prelude = { 43 url = "github:weyl-ai/straylight-buck2-prelude"; 44 flake = false; 45 }; 46 47 # NativeLink - Local Remote Execution for Buck2 48 # :: { url : "github:b7r6/nimi/add-static-build" } 49 # :: "github:b7r6/nimi/add-static-build" 50 # Provides CAS, scheduler, and worker for build caching 51 nativelink.url = "github:TraceMachina/nativelink"; 52 53 # nix2gpu - NixOS containers for GPU compute (vast.ai, runpod, fly.io) 54 # :: { flake-parts : t0 } | ... -> t4 55 # Uses nimi as PID 1 for modular services 56 nix2gpu = { 57 url = "github:fleek-sh/nix2gpu"; 58 inputs.nixpkgs.follows = "nixpkgs"; 59 }; 60 61 # Nimi - Tini-like PID 1 for containers and NixOS modular services 62 # Used for VM init scripts with proper process supervision 63 # Using fork with nimi-static for microVM support (PR: weyl-ai/nimi#12) 64 nimi = { 65 url = "github:b7r6/nimi/add-static-build"; 66 inputs.nixpkgs.follows = "nixpkgs"; 67 }; 68 }; 69 70 outputs = 71 inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } (import ./nix/_main.nix); 72 }