mirror of
https://github.com/xinux-org/nix-editor.git
synced 2026-04-12 10:48:55 +00:00
🔖 | Hard fork of @snowfallorg/nix-editor. [maintainer=@bahrom04]
- Rust 91.3%
- Nix 8.7%
| .github/workflows | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
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] <FILE> <ATTRIBUTE>
Arguments:
<FILE> Configuration file to read
<ATTRIBUTE> Nix configuration option arribute
Options:
-v, --val <VAL> Value to write
-a, --arr <ARR> Element to add
-d, --deref Dereference the value of the attribute
-i, --inplace Edit the file in-place
-o, --output <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