Skip to content

A simple rust program to edit NixOS configuration files with just a command

License

Notifications You must be signed in to change notification settings

snowfallorg/nix-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/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

About

A simple rust program to edit NixOS configuration files with just a command

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published