Nix Flake-модуль для воспроизводимых сред разработки. Репозиторий также включает в себя универсальные конфигурации линтеров, LSP и прочих инструментов.
- Nix 100%
| configs | ||
| modules | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Working Dev Shells
Reusable Nix flake module that provides Rust and Python development shells via flake-parts.
Features
- Rust - configurable toolchain channel (stable/beta/nightly), extensions, rust-analyzer, bacon, glib, openssl
- Python - Python 3.13, uv2nix-based virtual environment, ruff, ty
Usage
Add to your flake inputs:
{
inputs = {
working-devshells.url = "git+https://git.geekiot.tech/geekiot/working-devshells.git";
};
}
Import the module and enable what you need (flake-parts):
{
imports = [ inputs.working-devshells.flakeModule ];
perSystem = { config, ... }: {
workingDevShells.rust.enable = true;
workingDevShells.python = {
enable = true;
workspaceRoot = ./.;
};
};
}
Then enter the shell:
nix develop .#rust
nix develop .#python
Complete usage example
{
inputs = {
working-devshells.url = "git+https://git.geekiot.tech/geekiot/working-devshells.git";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.working-devshells.systems;
imports = [ inputs.working-devshells.flakeModule ];
perSystem =
{ config, ... }:
{
workingDevShells.python = {
enable = true;
workspaceRoot = ./.;
};
devShells.default = config.devShells.python;
};
};
}
Options
| Option | Type | Default | Description |
|---|---|---|---|
workingDevShells.rust.enable |
bool | false | Enable Rust dev shell |
workingDevShells.rust.channel |
enum | "stable" | "stable", "beta", or "nightly" |
workingDevShells.rust.extensions |
list of str | see module | Rustup extensions |
workingDevShells.python.enable |
bool | false | Enable Python dev shell |
workingDevShells.python.pythonPackage |
package | pkgs.python313 | Python package to use |
workingDevShells.python.workspaceRoot |
path | (required) | Path to uv workspace root |
workingDevShells.python.venvName |
str | ".venv" | Virtual environment name |
License
MIT