Isolated development environments using Nix Flakes — mainly for cross-compilation
(ARM64, ARM32, etc.) and other setups I use often. The idea is tokeep reusable shells
in one place, without duplicating shell.nix files across projects.
To enter an environment:
nix develop ~/nix-dev-shells#arm64Or with direnv, in your project:
use flake ~/nix-dev-shells#arm64.
├── flake.nix # Entry point
├── flake.lock # Auto-generated
└── shells/
├── nix-arm32-toolchain.nix
├── nix-arm64-toolchain.nix
├── nix-zephyr-sdk.nix
└── ...
Each file inside shells/ defines a dev environment. The flake just exposes them
under named outputs.
Avoid repeating toolchain setups (cross-GCC, headers, libs, etc.) in every project. This isn’t a package or system config — just a personal toolbox of ready-to-go environments.
- Nix with flakes enabled (
nix --version>= 2.4) direnv(optional but handy)
No promises of stability. If something breaks, I’ll fix it when I need it.
If you want to use the environments without typing the full path every time, you can register this flake under a short name:
nix registry add nix-dev-shells ~/nix-dev-shellsThen, you can run:
nix develop nix-dev-shells#arm64This works globally, from any directory.
To see your current flake registry:
nix registry listTo remove a registered flake:
nix registry remove nix-dev-shells