mirror of
https://github.com/ryantm/agenix.git
synced 2024-08-16 17:40:36 +03:00
Compare commits
3 Commits
4a3eae3a50
...
13b69f4aa7
Author | SHA1 | Date | |
---|---|---|---|
|
13b69f4aa7 | ||
|
07479c2e73 | ||
|
2c9abfec86 |
@ -205,7 +205,7 @@ You can run the CLI tool ad-hoc without installing it:
|
||||
nix run github:ryantm/agenix -- --help
|
||||
```
|
||||
|
||||
But you can also add it permanently into a [NixOS module](https://nixos.wiki/wiki/NixOS_modules)
|
||||
But you can also add it permanently into a [NixOS module](https://wiki.nixos.org/wiki/NixOS_modules)
|
||||
(replace system "x86_64-linux" with your system):
|
||||
|
||||
```nix
|
||||
|
@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
age,
|
||||
jq,
|
||||
gnused,
|
||||
nix,
|
||||
mktemp,
|
||||
diffutils,
|
||||
@ -18,6 +19,7 @@ in
|
||||
src = substituteAll {
|
||||
inherit ageBin version;
|
||||
jqBin = "${jq}/bin/jq";
|
||||
sedBin = "${gnused}/bin/sed";
|
||||
nixInstantiate = "${nix}/bin/nix-instantiate";
|
||||
mktempBin = "${mktemp}/bin/mktemp";
|
||||
diffBin = "${diffutils}/bin/diff";
|
||||
|
@ -115,7 +115,7 @@ function cleanup {
|
||||
trap "cleanup" 0 2 3 15
|
||||
|
||||
function keys {
|
||||
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$1\".publicKeys)" | @jqBin@ -r .[]) || exit 1
|
||||
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$1\".publicKeys)" | @jqBin@ -r .[] | @sedBin@ '/^$/d') || exit 1
|
||||
}
|
||||
|
||||
function decrypt {
|
||||
|
Loading…
Reference in New Issue
Block a user