diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
new file mode 100644
index 0000000000000000000000000000000000000000..94883509ceeba1aa882e7b46fcdb0242afc84ead
--- /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]
+    steps:
+      - uses: actions/checkout@v4
+      - uses: DeterminateSystems/nix-installer-action@main
+      - uses: DeterminateSystems/magic-nix-cache-action@main
+      - run: nix --accept-flake-config build -L
+      - run: nix --accept-flake-config run .#cachix push gepetto $(readlink result)
+        if: github.repository_owner == 'humanoid-path-planner'
+        env:
+          CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
diff --git a/cmake b/cmake
index 657b07cb721ecbc383d4e76438eb6ec5c421a332..2bea127e8113a32f216ae7a7201e36a6e7c56cc2 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit 657b07cb721ecbc383d4e76438eb6ec5c421a332
+Subproject commit 2bea127e8113a32f216ae7a7201e36a6e7c56cc2
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b85d62e83a778cc4c209c043c0ee915422b2a791
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,55 @@
+{
+  lib,
+  cddlib,
+  clp,
+  cmake,
+  glpk,
+  hpp-centroidal-dynamics,
+  ndcurves,
+  python3Packages,
+  qpoases,
+}:
+
+python3Packages.buildPythonPackage {
+  pname = "hpp-bezier-com-traj";
+  version = "5.0.0";
+  pyproject = false;
+
+  src = lib.fileset.toSource {
+    root = ./.;
+    fileset = lib.fileset.unions [
+      ./CMakeLists.txt
+      ./include
+      ./package.xml
+      ./python
+      ./src
+      ./tests
+    ];
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [
+    cddlib
+    clp
+    glpk
+    hpp-centroidal-dynamics
+    ndcurves
+    qpoases
+  ];
+
+  cmakeFlags = [ "-DUSE_GLPK=ON" ];
+
+  doCheck = true;
+
+  pythonImportsCheck = [ "hpp_bezier_com_traj" ];
+
+  meta = {
+    description = "Multi contact trajectory generation for the COM using Bezier curves";
+    homepage = "https://github.com/humanoid-path-planner/hpp-bezier-com-traj";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.nim65s ];
+  };
+}
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000000000000000000000000000000000000..18fdc93e7d01207588a07e733c5f5f5ac7c606f1
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,97 @@
+{
+  "nodes": {
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1719877454,
+        "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
+    "hpp-centroidal-dynamics": {
+      "inputs": {
+        "flake-parts": [
+          "flake-parts"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1719769266,
+        "narHash": "sha256-z5JfncCDNHYhpGZ+CDiq/o/1g7bGbfiBrcEx0aIoD6w=",
+        "owner": "humanoid-path-planner",
+        "repo": "hpp-centroidal-dynamics",
+        "rev": "f4622a437cf7a596897f38d61e5477a7b6387877",
+        "type": "github"
+      },
+      "original": {
+        "owner": "humanoid-path-planner",
+        "repo": "hpp-centroidal-dynamics",
+        "type": "github"
+      }
+    },
+    "ndcurves": {
+      "inputs": {
+        "flake-parts": [
+          "flake-parts"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1719583351,
+        "narHash": "sha256-N0XZQGm4uNArzPHbSl9bBM0kTwi7cCDOzPCM3lJ98Gk=",
+        "owner": "loco-3d",
+        "repo": "ndcurves",
+        "rev": "e84762286a356e185f38c9846ee8a9c4c49be43b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "loco-3d",
+        "ref": "release/1.5.0",
+        "repo": "ndcurves",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1719674427,
+        "narHash": "sha256-z2hCpVyfnmYTA5iabf1SW4peFV9itE1JJcXNBKIFkDg=",
+        "owner": "nim65s",
+        "repo": "nixpkgs",
+        "rev": "b81610d293fac26c2ec6a81718a979bc25f8c155",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nim65s",
+        "ref": "gepetto",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "flake-parts": "flake-parts",
+        "hpp-centroidal-dynamics": "hpp-centroidal-dynamics",
+        "ndcurves": "ndcurves",
+        "nixpkgs": "nixpkgs"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000000000000000000000000000000000..cd0c51352c7f633db9679552952379584347fb57
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,50 @@
+{
+  description = "Multi contact trajectory generation for the COM using Bezier curves";
+
+  inputs = {
+    nixpkgs.url = "github:nim65s/nixpkgs/gepetto";
+    flake-parts = {
+      url = "github:hercules-ci/flake-parts";
+      inputs.nixpkgs-lib.follows = "nixpkgs";
+    };
+    hpp-centroidal-dynamics = {
+      url = "github:humanoid-path-planner/hpp-centroidal-dynamics";
+      inputs.nixpkgs.follows = "nixpkgs";
+      inputs.flake-parts.follows = "flake-parts";
+    };
+    ndcurves = {
+      url = "github:loco-3d/ndcurves/release/1.5.0";
+      inputs.nixpkgs.follows = "nixpkgs";
+      inputs.flake-parts.follows = "flake-parts";
+    };
+  };
+
+  outputs =
+    inputs@{ flake-parts, ... }:
+    flake-parts.lib.mkFlake { inherit inputs; } {
+      imports = [ ];
+      systems = [
+        "x86_64-linux"
+        "aarch64-linux"
+        "aarch64-darwin"
+        "x86_64-darwin"
+      ];
+      perSystem =
+        {
+          self',
+          pkgs,
+          system,
+          ...
+        }:
+        {
+          packages = {
+            inherit (pkgs) cachix;
+            default = pkgs.callPackage ./. {
+              hpp-centroidal-dynamics = inputs.hpp-centroidal-dynamics.packages.${system}.default;
+              ndcurves = inputs.ndcurves.packages.${system}.default;
+            };
+          };
+          devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
+        };
+    };
+}
diff --git a/package.xml b/package.xml
index a8e0f48a3926616e19904518986632600146bb28..c40de956cfdadfac5d5450ef0aea3943737b922e 100644
--- a/package.xml
+++ b/package.xml
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <package format='2'>
     <name>hpp-bezier-com-traj</name>
-    <version>5.0.0</version>
+    <version>5.1.0</version>
     <description>Multi contact trajectory generation for the COM using Bezier curves</description>
 
     <maintainer email='guilhem.saurel@laas.fr'>Guilhem Saurel</maintainer>
diff --git a/pyproject.toml b/pyproject.toml
index 8b8f5a3abae77f97a2eb5b6061d4ded07cc68677..a8e779c3aa6216152b35483a77db0f31dec40725 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,7 +18,7 @@ dependencies = [
 description = "Multi contact trajectory generation for the COM using Bezier curves"
 license = "BSD-2-Clause"
 name = "hpp-bezier-com-traj"
-version = "5.0.0"
+version = "5.1.0"
 
 [tool.cmeel]
 configure-args = ["-DUSE_GLPK=ON"]