Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snowfallorg/nix-editor
A simple rust program to edit NixOS configuration files with just a command
https://github.com/snowfallorg/nix-editor
linux nix nixos
Last synced: 13 days ago
JSON representation
A simple rust program to edit NixOS configuration files with just a command
- Host: GitHub
- URL: https://github.com/snowfallorg/nix-editor
- Owner: snowfallorg
- License: mit
- Created: 2022-01-12T03:52:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T03:49:28.000Z (8 months ago)
- Last Synced: 2024-10-30T02:48:19.364Z (15 days ago)
- Topics: linux, nix, nixos
- Language: Rust
- Homepage:
- Size: 142 KB
- Stars: 72
- Watchers: 6
- Forks: 6
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nix Editor
===
[![crates.io][crates badge]][crate]
[![Coverage Status][coveralls badge]][coveralls]
[![Built with Nix][builtwithnix badge]][builtwithnix]
[![License: MIT][MIT badge]][MIT]A command line utility for modifying NixOS configuration values.
## Installation
### nix-env
```
git clone https://github.com/snowfallorg/nix-editor
nix-env -f nix-editor -i nix-editor
```
### nix profile
```
nix profile install github:snowfallorg/nix-editor
```## Run with Nix Flakes
```
nix run github:snowfallorg/nix-editor -- --help
``````
Usage: nix-editor [OPTIONS]Arguments:
Configuration file to read
Nix configuration option arributeOptions:
-v, --val Value to write
-a, --arr Element to add
-d, --deref Dereference the value of the attribute
-i, --inplace Edit the file in-place
-o, --output Output file for modified config or read value
-r, --raw Prints console output without newlines or trimmed output
-f, --format Formats output using nixpkgs-fmt. Helps when writing new values
-h, --help Print help
-V, --version Print version
```
[coveralls badge]: https://img.shields.io/coveralls/github/vlinkz/nix-editor?style=for-the-badge
[coveralls]: https://coveralls.io/github/vlinkz/nix-editor
[crates badge]: https://img.shields.io/crates/v/nix-editor.svg?style=for-the-badge
[crate]: https://crates.io/crates/nix-editor
[builtwithnix badge]: https://img.shields.io/badge/Built%20With-Nix-41439A?style=for-the-badge&logo=nixos&logoColor=white
[builtwithnix]: https://builtwithnix.org/
[MIT badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge
[MIT]: https://opensource.org/licenses/MIT