https://github.com/nulladmin1/nix-flake-templates
A collection of Nix Flake Templates for: Python, CMake, Poetry, uv, Rust, Fenix, Naersk, Vim, Zig, Bash etc.
https://github.com/nulladmin1/nix-flake-templates
c cmake cplusplus cpp fenix go golang linux nix nix-flake nixpkgs poetry python rust template template-project templates zig
Last synced: 5 months ago
JSON representation
A collection of Nix Flake Templates for: Python, CMake, Poetry, uv, Rust, Fenix, Naersk, Vim, Zig, Bash etc.
- Host: GitHub
- URL: https://github.com/nulladmin1/nix-flake-templates
- Owner: nulladmin1
- Created: 2024-10-14T00:26:03.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-11T22:28:23.000Z (8 months ago)
- Last Synced: 2025-05-12T22:55:14.075Z (5 months ago)
- Topics: c, cmake, cplusplus, cpp, fenix, go, golang, linux, nix, nix-flake, nixpkgs, poetry, python, rust, template, template-project, templates, zig
- Language: Nix
- Homepage:
- Size: 568 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# ❄️ Nix Flake Templates
[](https://builtwithnix.org) [](https://forthebadge.com)
A collection of Nix Flake Templates

**Contributors, go to [CONTRIBUTING.md](./CONTRIBUTING.md)**
## Table of Contents
- [Usage](#usage)
- [Examples](#examples)## Usage
Use [`getflake`](https://github.com/nulladmin1/getflake) to initialize flake (recommended)
```shell
nix run github:nulladmin1/getflake
```Or initialize using
```shell
nix flake init --template "github:nulladmin1/nix-flake-templates#${TYPE_KEYWORD}"
```Where `${TYPE_KEYWORD}` is the supported type keyword of template:
| Type Keyword | Type | Subdirectory | Documentation |
| ----------------------------------- | ------------------------------ | -------------------------------------------- | ---------------------------------------- |
| `bash`, `sh` | Bash using Nixpkgs Builders | [bash](bash) | [README](bash/README.md) |
| `bevy` | Bevy using Fenix and Crane | [bevy](bevy) | [README](bevy/README.md) |
| `cpp`, `cpp-cmake` | C++ using CMake | [cpp-cmake](cpp-cmake) | [README](cpp-cmake/README.md) |
| `default` | Development | [default](default) | [README](default/README.md) |
| `flutter`, `flutter-nix` | Flutter using Nixpkgs Builders | [flutter-nix](flutter-nix) | [README](flutter-nix/README.md) |
| `go`, `go-gomod2nix` | Go using gomod2nix | [go-gomod2nix](go-gomod2nix) | [README](go-gomod2nix/README.md) |
| `go-nix` | Go with Nixpkgs Builders | [go-nix](go-nix) | [README](go-nix/README.md) |
| `nixpkgs` | Nixpkgs Development | [nixpkgs](nixpkgs) | [README](nixpkgs/README.md) |
| `python`, `python-nix` | Python using Nixpkgs builders | [python-nix](python-nix) | [README](python-nix/README.md) |
| `poetry`, `python-poetry` | Python using Poetry | [python-poetry](python-poetry) | [README](python-poetry/README.md) |
| `pyproject`, `python-pyproject-nix` | Python using Pyproject-nix | [python-pyproject-nix](python-pyproject-nix) | [README](python-pyproject-nix/README.md) |
| `python-uv`, `uv` | Python using uv2nix | [python-uv](python-uv) | [README](python-uv/README.md) |
| `crane`, `rust`, `rust-fenix-crane` | Rust using Fenix and Crane | [rust-fenix-crane](rust-fenix-crane) | [README](rust-fenix-crane/README.md) |
| `rust-fenix-naersk` | Rust using Fenix and Naersk | [rust-fenix-naersk](rust-fenix-naersk) | [README](rust-fenix-naersk/README.md) |
| `rust-nix` | Rust using Nixpkgs Builders | [rust-nix](rust-nix) | [README](rust-nix/README.md) |
| `vim`, `vimPlugins` | vimPlugins | [vimPlugins](vimPlugins) | [README](vimPlugins/README.md) |
| `zig` | Zig using Nixpkgs Builders | [zig](zig) | [README](zig/README.md) |## Examples
[`getflake`](https://github.com/nulladmin1/getflake) (using `rust-fenix-naersk`) - A simple to program to automatically instantiate my [Nix-Flake-Templates](https://github.com/nulladmin1/nix-flake-templates)
[`eightQueens`](https://github.com/nulladmin1/eightQueens) (using `cpp-cmake`) - A rendition of the famous [Eight Queens Puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle) in `C++`
[`mp2ExtraCredit`](https://github.com/nulladmin1/eightQueens) (using `cpp-cmake`) - A solution of a plague simulation I had to do for Computer Science II, in `C++`
[`josephus-rs`](https://github.com/nulladmin1/josephus-rs) (using `rust-fenix-naersk`) - An implementation of the [Josephus problem](https://en.wikipedia.org/wiki/Josephus_problem) in `Rust`
[`sha256_python_with_tests`](examples/sha256_python_with_tests) - A simple Python program with testcases to encode a user-inputted string in SHA256