Nix Flake-модуль для воспроизводимых сред разработки. Репозиторий также включает в себя универсальные конфигурации линтеров, LSP и прочих инструментов.
Find a file
2026-05-15 16:46:48 +05:00
configs update: update treefmt ruff config 2026-05-15 16:46:48 +05:00
modules fix: fix issues with flakes & add README (contains usage examples) 2026-05-09 23:23:05 +05:00
flake.lock feat: switching to flake-parts for quick dev environment setup 2026-05-09 22:27:44 +05:00
flake.nix fix: fix issues with flakes & add README (contains usage examples) 2026-05-09 23:23:05 +05:00
LICENSE Add LICENSE 2026-01-28 03:53:13 +05:00
README.md update: add full usage example 2026-05-09 23:33:38 +05:00

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