Skip to content

Repository files navigation

ℵ-0xFF

Minimal viable Nix: formatting, linting, Buck2 toolchains, remote execution.

Quick Start

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    aleph.url = "github:straylight-software/aleph-0xff";
  };

  outputs = { nixpkgs, aleph, ... }: {
    # Import the default module
    imports = [ aleph.flakeModules.default ];

    perSystem = { pkgs, config, ... }: {
      # Buck2 target → Nix derivation
      packages.myapp = config.buck2.build {
        target = "//src:myapp";
      };
    };
  };
}

Then:

nix fmt          # Format everything
nix flake check  # Lint everything
nix develop      # Shell with buck2 + toolchains

What You Get

LLVM 22 from git

SM120 (Blackwell) support. Clean clang without nixpkgs' CUDA wrapper hacks.

pkgs.llvm-git  # Available via overlay

Formatting (nix fmt)

Language Tool
Nix nixfmt
C/C++/CUDA clang-format
Python ruff
Rust rustfmt
Haskell fourmolu
JavaScript/TypeScript biome
Lua stylua
TOML taplo
YAML yamlfmt
Markdown mdformat
Shell shfmt

Linting (nix flake check)

Language Tools
Nix statix, deadnix, ast-grep rules
C/C++ clang-tidy, cppcheck, ast-grep rules
Shell shellcheck
Python ruff check

Buck2 Integration

Dhall-typed toolchains and build specifications. No external prelude—we bring our own.

-- dhall/Toolchain.dhall
let Toolchain = { cc : Text, cxx : Text, ar : Text, ... }

Remote Execution

NativeLink CAS for distributed builds:

aleph.build.remote.enable = true;

Modules

Module Purpose
flakeModules.default All of the below
flakeModules.formatter treefmt integration
flakeModules.lint Lint configs + rules
flakeModules.buck2 Buck2 → Nix derivation
flakeModules.build Toolchain options
flakeModules.devshell Development shell
flakeModules.nativelink Remote execution
flakeModules.std nixpkgs + llvm-git overlay

Overlays

{
  nixpkgs.overlays = [ aleph.overlays.default ];
  # or
  nixpkgs.overlays = [ aleph.overlays.llvm-git ];
}

Lint Rules

AST-grep rules in linter/rules/:

Rule Description
no-raw-mkderivation Use builders, not raw mkDerivation
with-lib Avoid with lib;
rec-in-derivation No rec in derivation attrs
or-null-fallback Prefer value or null patterns
missing-meta Require meta attributes
cpp-raw-new-delete Ban raw new/delete in C++
... See linter/rules/

Part of Aleph

This is the bootstrap layer of the Aleph project — a ground-up rethinking of Nix infrastructure with formal verification, typed derivations, and daemon-free operation.

ℵ-0xFF is the part you can use today without buying into the full vision.

License

MIT

About

// aleph // 0x0FF //

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages