https://github.com/leonwind/nix-shell-generator
Small CLI tool to quickly import and store shell.nix templates.
https://github.com/leonwind/nix-shell-generator
nix nix-shell nixos
Last synced: 5 months ago
JSON representation
Small CLI tool to quickly import and store shell.nix templates.
- Host: GitHub
- URL: https://github.com/leonwind/nix-shell-generator
- Owner: leonwind
- License: mit
- Created: 2022-06-19T22:16:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T22:22:15.000Z (about 4 years ago)
- Last Synced: 2025-10-30T11:46:53.787Z (8 months ago)
- Topics: nix, nix-shell, nixos
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Nix-Shell-Generator
## Usages
### Store an existing `shell.nix`
Go into your project directory with an existing `shell.nix` file and run
```shell
nix-shell-generator --add nix-shell-descriptive-name
```
E.g. for a `shell.nix` file for a `C++` project using `GCC, cmake, boost, valgrind, gdb` you can run
```shell
nix-shell-generator --add gcc-boost-debugger
```
You can also add an `--path path/to/shell.nix` argument if your `shell.nix` is not in your current working directory.
### Add existing `shell.nix` into your project
Run `nix-shell-generator --get` to open a fuzzy finder to search and select your `shell.nix` template.
The template gets renamed and copied to `./shell.nix`.
## Installation
Install by running
```shell
go install github.com/leonwind/nix-shell-generator/cmd/nix-shell-generator@06d5c91
```
Your `shell.nix` templates will be stored in `~/.config/nix-shell-generator/`.
For more practical usage, set up a shell alias: `alias nsg = "nix-shell-generator"`