https://github.com/vst/nix-flake-templates
Personal Nix Flake Templates
https://github.com/vst/nix-flake-templates
flake nix template
Last synced: about 1 year ago
JSON representation
Personal Nix Flake Templates
- Host: GitHub
- URL: https://github.com/vst/nix-flake-templates
- Owner: vst
- License: mit
- Created: 2025-05-06T02:38:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-06T04:43:23.000Z (about 1 year ago)
- Last Synced: 2025-05-07T06:49:38.018Z (about 1 year ago)
- Topics: flake, nix, template
- Language: Nix
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nix Flake Templates
- [Nix Flake Templates](#nix-flake-templates)
- [`trivial` — A Basic Nix Flake Template](#trivial-mdash-a-basic-nix-flake-template)
- [`python-script` — A Python Program Script Template](#python-script-mdash-a-python-program-script-template)
## `trivial` — A Basic Nix Flake Template
This template does nothing much. It demonstrates how to create a Nix Flake for
multiple target systems using [flake-utils].
Use the template:
```sh
nix flake init --template github:vst/nix-flake-templates#trivial
```
You can run the default package defined in the Nix Flake without checking out
the repository:
```sh
nix run "github:vst/nix-flake-templates?dir=templates/trivial" --no-write-lock-file
```
If you have checked out this repository, then:
```sh
nix run ./templates/trivial
```
## `python-script` — A Python Program Script Template
This template turns a Python script into an executable program as Nix Flake
output.
Use the template:
```sh
nix flake init --template github:vst/nix-flake-templates#python-script
```
You can run the default package defined in the Nix Flake without checking out
the repository:
```sh
nix run "github:vst/nix-flake-templates?dir=templates/python-script" --no-write-lock-file
```
If you have checked out this repository, then:
```sh
nix run ./templates/python-script
```
[flake-utils]: https://github.com/numtide/flake-utils