diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..1d953f4b --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 93c801d9..a7e6d4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ /zmk-config /build *.DS_Store -__pycache__ \ No newline at end of file +__pycache__ +/.direnv diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..a4457345 --- /dev/null +++ b/shell.nix @@ -0,0 +1,23 @@ +{ pkgs ? import { } }: + +with pkgs; + +let inherit (lib) ; +in mkShell { + buildInputs = [ + cmake + ninja + python3 + ccache + dtc + dfu-util + gcc-arm-embedded + python38Packages.west + python38Packages.pyelftools + ]; + + shellHook = '' + export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb + export GNUARMEMB_TOOLCHAIN_PATH=${pkgs.gcc-arm-embedded} + ''; +}