- Nix 79.5%
- HTML 10.2%
- CSS 7.3%
- Python 2.6%
- Lua 0.2%
- Other 0.2%
|
All checks were successful
Actions / Build Flake Packages (push) Successful in 43s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .zed | ||
| assets | ||
| home-manager | ||
| hosts | ||
| lib | ||
| nixos | ||
| packages | ||
| programs | ||
| scripts | ||
| shared | ||
| templates | ||
| .envrc | ||
| .gitignore | ||
| .luarc.json | ||
| .sops.yaml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json5 | ||
| secrets.sops.yaml | ||
flake
Hi there! This repository contains my NixOS flake. This is mainly meant as a utility for my own use, but if you'd like to base your configs on mine for some reason, feel free!
Templates
These devshell templates come with direnv and nix-direnv support. Here is an example NixOS configuration to enable these tools.
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
direnvrcExtra =
# setting the DIRENV_DISABLE environment variable will prevent direnv from running.
# useful for scripts, so you don't have to wait for a flake to evaluate.
''
''${DIRENV_DISABLE:+exit}
'';
};
}
Simple
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/flake#simple"
uv
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/flake#uv"
Avoiding Python Compilation
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.
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="
];
};
};
uv2nix
This template offers a Python environment, similar to that of the uv template, but built by Nix using the uv2nix project. This is not meant to be dropped into pre-existing projects like the uv template is, and as such it comes with a pyproject.toml and uv.lock file included. Use the following command to add it to your project:
nix flake init -t "git+https://c.csw.im/cswimr/flake#uv2nix"