Reproducible Nix packages for TEEs
Find a file
2025-07-16 01:01:04 +00:00
.github chore(deps): update trufflesecurity/trufflehog action to v3.90.0 2025-07-16 01:01:04 +00:00
overlays/libTee Merge branch 'main' into gramine-v1.8 2024-11-19 23:08:47 +07:00
packages fix(gramine): add build system python packages 2024-12-10 09:42:41 +01:00
.gitignore feat: add GRAMINE_DIRECT 2024-06-14 20:43:03 +02:00
COPYING feat: initial commit 2024-02-07 11:25:05 +01:00
flake.lock chore: update flake.nix to nixos 24.11 2024-12-09 12:21:56 +01:00
flake.nix chore: update flake.nix to nixos 24.11 2024-12-09 12:21:56 +01:00
README.md docs: add test enclave usage examples, move reference repos to their own subsection 2024-11-14 11:58:33 -05:00

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: