Important
As of 6/11/2025, this repository is archived. Please use the templates located at cswimr/flake instead.
This template has all the batteries included to get you started with numtide's devshell
. Use the following command to add it to your project:
nix flake init -t "git+https://c.csw.im/cswimr/dev-flakes#simple"
This template offers a Python environment, sporting uv
as the package manager and some example packages. It also automatically handles installing your dependencies, whether they're from a pyproject.toml
file or from an older requirements.txt
file. Use the following command to add it to your project:
nix flake init -t "git+https://c.csw.im/cswimr/dev-flakes#uv"
This template uses nixpkgs-python
to retrieve Python builds. You can use Cachix to add their binary cache to your user configuration. This will avoid lengthy Python compilation times. Their README has more information on this topic.
You can use the following command to add the binary cache to your user's nix.conf
file:
nix-shell -p cachix --run "cachix use nixpkgs-python"
Here's an example NixOS configuration that configures this binary cache system-wide:
{
nix = {
substituters = [
"https://nixpkgs-python.cachix.org"
];
trusted-public-keys = [
"nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="
];
};
};