Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Nov 4, 2024
1 parent ed0c6f0 commit 0b2fc13
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 77 deletions.
92 changes: 21 additions & 71 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ nom = "7.1.3"
pinentry = "0.5.1"
rpassword = "7.3.1"
serde = "1.0.210"
serde_json = "1.0.132"
sha2 = "0.10.8"
spdlog-rs = "0.3.13"
subtle = "2.6.1"
sys-mount = "3.0.1"
tempdir = "0.3.7"
toml = "0.8.19"

[profile.release]
opt-level = "z"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Vaultix

![built with nix](https://img.shields.io/static/v1?logo=nixos&logoColor=white&label=&message=Built%20with%20Nix&color=41439a)
![state](https://img.shields.io/badge/works-on%20my%20machines-FEDFE1)
![built for nixos](https://img.shields.io/static/v1?logo=nixos&logoColor=white&label=&message=Built%20with%20Nix&color=41439a)
![CI state](https://github.com/oluceps/vaultix/actions/workflows/lint.yaml/badge.svg)

Secret management for NixOS.
Expand Down
5 changes: 4 additions & 1 deletion apps/renc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ writeShellScriptBin "renc" (
map (
n:
let
profile = (pkgs.formats.toml { }).generate "secret-meta" n;
profile = pkgs.writeTextFile {
name = "secret-meta";
text = builtins.toJSON n;
};
in
"${bin} ${profile} renc"
) vaultixs
Expand Down
5 changes: 4 additions & 1 deletion module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ in

config =
let
profile = (pkgs.formats.toml { }).generate "secret-meta-${config.networking.hostName}" cfg;
profile = pkgs.writeTextFile {
name = "secret-meta-${config.networking.hostName}";
text = (builtins.toJSON cfg);
};
checkRencSecsReport =
pkgs.runCommandNoCCLocal "secret-check-report" { }
"${lib.getExe cfg.package} ${profile} check > $out";
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Args {

let profile: Profile = {
let file = fs::read_to_string(&self.profile).wrap_err("arg `profile` not found")?;
toml::from_str(file.as_str())?
serde_json::from_str(file.as_str())?
};

let flake_root = if let Some(f) = &self.flake_root {
Expand Down

0 comments on commit 0b2fc13

Please sign in to comment.