12 releases

0.3.0 Feb 3, 2023
0.3.0-beta.1 Oct 6, 2022
0.2.12 Jul 18, 2022
0.2.11 Jun 23, 2022
0.2.6 Mar 27, 2022

#387 in Configuration

Download history 119/week @ 2024-07-27 120/week @ 2024-08-03 93/week @ 2024-08-10 119/week @ 2024-08-17 120/week @ 2024-08-24 147/week @ 2024-08-31 92/week @ 2024-09-07 98/week @ 2024-09-14 129/week @ 2024-09-21 92/week @ 2024-09-28 62/week @ 2024-10-05 81/week @ 2024-10-12 69/week @ 2024-10-19 57/week @ 2024-10-26 119/week @ 2024-11-02 89/week @ 2024-11-09

337 downloads per month
Used in 9 crates (5 directly)

MIT license

105KB
1.5K SLoC

Nix Editor

crates.io Coverage Status Built with Nix License: MIT

A command line utility for modifying NixOS configuration values.

Installation

nix-env

git clone https://github.com/vlinkz/nix-editor
nix-env -f nix-editor -i nix-editor

nix profile

nix profile install github:vlinkz/nix-editor

Run with Nix Flakes

nix run github:vlinkz/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

Dependencies

~8–17MB
~224K SLoC