mirror of
https://github.com/matter-labs/nixsgx.git
synced 2025-07-21 07:33:55 +02:00
Reproducible Nix packages for TEEs
![]() - Update nixpkgs to 25.05 and Node.js to version 24. - Adjust SGX SDK build flags to suppress additional warnings. - Disable parallel building for SGX SDK due to Intel constraints. Signed-off-by: Harald Hoyer <harald@matterlabs.dev> |
||
---|---|---|
.github | ||
overlays/libTee | ||
packages | ||
.gitignore | ||
COPYING | ||
flake.lock | ||
flake.nix | ||
README.md |
nixsgx
This repository contains a Nix flake with up-to-date packages for the Intel SGX SDK and gramine.
Hopefully most of the packages will be upstreamed to nixpkgs at some point.
All package builds should be reproducible and therefore can be used to build reproducible enclave images.
Usage
Test enclave
A testing enclave container is provided and can be ran like so:
# Build the dcap (or azure) container variant
nix build .#nixsgx-test-sgx-dcap
# Load image into docker
docker load < result
# Run the enclave, binding the sgx devices
docker run -i --init --rm \
--device /dev/sgx_enclave \
--device /dev/sgx_provision \
nixsgx-test-sgx-dcap:latest
Note: An external aesmd instance can be provided by mounting the socket to the container:
-v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket
Reference projects
The following projects provide reproducible enclaves using nixsgx: