diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
new file mode 100644
index 0000000000000000000000000000000000000000..7c7bbc2ed7f9a3c95fec5eca5b9108055268f025
--- /dev/null
+++ b/.github/workflows/nix.yml
@@ -0,0 +1,20 @@
+name: "Nix CI"
+
+on: [pull_request, push]
+
+jobs:
+  tests:
+    name: "Nix build on ${{ matrix.os }}"
+    runs-on: "${{ matrix.os }}-latest"
+    strategy:
+      matrix:
+        os: [ubuntu, macos]
+    steps:
+      - uses: actions/checkout@v4
+      - uses: DeterminateSystems/nix-installer-action@main
+        with:
+          extra-conf: |
+            trusted-substituters = https://gepetto.cachix.org
+            trusted-public-keys = gepetto.cachix.org-1:toswMl31VewC0jGkN6+gOelO2Yom0SOHzPwJMY2XiDY=
+      - uses: DeterminateSystems/magic-nix-cache-action@main
+      - run: nix build