Skip to content

Commit

Permalink
Add badges to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vlinkz committed Apr 7, 2022
1 parent 42c7512 commit ebecea1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 33 deletions.
24 changes: 0 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ include = [
]

[dependencies]
serde_json = "1.0.79"
clap = { version = "3.1.8", features = ["derive"] }
rnix = "0.10.1"
owo-colors = "3.3.0"
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Nix-Editor
Nix-Editor
===
[![crates.io][crates badge]][crate]
[![Coverage Status][coveralls badge]][coveralls]
[![Built with Nix][builtwithnix badge]][builtwithnix]
[![License: GPL v3][gplv3 badge]][gplv3]

A command line utility for modifying NixOS configuration values.

## NixOS Installation
Expand Down Expand Up @@ -28,4 +34,12 @@ OPTIONS:
-o, --output <OUTPUT> Output file for modified config or read value
-v, --val <VAL> Value to write
-V, --version Print version information
```
```
[coveralls badge]: https://img.shields.io/coveralls/github/vlinkz/nix-editor?style=flat-square
[coveralls]: https://coveralls.io/github/vlinkz/nix-editor
[crates badge]: https://img.shields.io/crates/v/nix-editor.svg?style=flat-square
[crate]: https://crates.io/crates/nix-editor
[builtwithnix badge]: https://img.shields.io/badge/Built%20With-Nix-41439A?style=flat-square&logo=nixos&logoColor=white
[builtwithnix]: https://builtwithnix.org/
[gplv3 badge]: https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat-square
[gplv3]: https://www.gnu.org/licenses/gpl-3.0
3 changes: 0 additions & 3 deletions src/read.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use crate::parse::{findattr, getcfgbase};
use rnix::{SyntaxKind, SyntaxNode};
use serde_json::{self, Value};
use std::{process::Command};

pub enum ReadError {
ParseError,
NoAttr,
Expand Down
4 changes: 1 addition & 3 deletions src/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use serde_json::de::Read;

use crate::{
read::{getarrvals, readvalue, ReadError, getwithvalue},
write::{ addtoarr, deref, write, rmarr }, parse::{collectattrs, getcfgbase},
};
use core::panic;
use std::{fs, io::Write, path::Path, collections::HashMap};
use std::{fs, path::Path, collections::HashMap};

#[test]
fn read_val1() {
Expand Down

0 comments on commit ebecea1

Please sign in to comment.