Commit graph

209 commits

Author SHA1 Message Date
Ryan Mulligan
1141c36c26 fix: disallow Nix store paths in age.identityPaths option 2023-02-26 09:03:17 -08:00
Ryan Mulligan
833f87c8ff
Merge pull request #164 from whentze/decrypt-only-fix-binary
fix -d/--decrypt-only not working correctly for binary data
2023-02-24 06:01:20 -08:00
Wanja Hentze
7dae15b7bc fix -d/--decrypt-only not working correctly for binary data
I had first used `printf` for outputting the data,
but that breaks if the secret itself contains null bytes.

One could fix this by using e.g. `cat`, but looking a bit more at the code
I realized that in the -d case we never need to `mktemp` at all and can
just ask `age` to write directly to stdout by not setting -o.
2023-02-24 09:00:48 +01:00
Ryan Mulligan
c2a71c83c7
Merge pull request #158 from whentze/decrypt-only
add -d/--decrypt option to decrypt a file to stdout
2023-02-22 20:25:46 -08:00
muvlon
9cf1967039 feature: add -d/--decrypt option to decrypt a file to stdout 2023-02-22 19:20:58 -08:00
Ryan Mulligan
2d735d6518
Merge pull request #162 from ryantm/rtm-2-21-stop-packaging-rage
contrib: stop packaging rage
2023-02-22 09:07:10 -08:00
Ryan Mulligan
2c0ae7d44f contrib: stop packaging rage
We don't need to package rage anymore, since all the latest maintained
versions of Nix have versions higher than what we need.
2023-02-21 20:33:19 -08:00
Ryan Mulligan
0c50bbe60e
Merge pull request #161 from n8henrie/warnings-to-stderr
Output user-facing warnings to stderr instead of stdout
2023-02-21 15:17:43 -08:00
Nathan Henrie
283c178469 Add warn and err helpers, use diff -q 2023-02-21 12:46:44 -07:00
Nathan Henrie
d84a99d0b8 Redirect user-directed warnings to stderr 2023-02-21 12:42:19 -07:00
Nathan Henrie
5f66c8aa77
Merge pull request #154 from ryantm/rtm-2-19-pipe
feature: pipe cleartext into agenix -e
2023-02-20 09:30:39 -07:00
Ryan Mulligan
53da86e976
Merge pull request #156 from mputz86/main
Make isDarwin check more robust
2023-02-20 06:45:27 -08:00
Matthias Putz
ec66ebe0ee Make isDarwin check more robust 2023-02-20 13:47:48 +01:00
Ryan Mulligan
344c8e41d2 feature: pipe cleartext into agenix -e
If STDIN is not interactive, change EDITOR to `cp /dev/stdin`.

fixes #33
2023-02-19 10:20:07 -08:00
Ryan Mulligan
2c56a93426
Merge pull request #153 from ryantm/rtm-2-18-test-docs
contrib: add instructions for running the tests
2023-02-18 21:50:37 -08:00
Ryan Mulligan
c602dc4ffb contrib: add instructions for running the tests 2023-02-18 18:37:43 -08:00
Nathan Henrie
78a22dbc0d
Merge pull request #152 from ryantm/rtm-2-18-fix-bogus-id-rsa 2023-02-18 16:00:27 -07:00
Ryan Mulligan
16c6ccef09 test: simplify and speed up editor tests 2023-02-18 12:52:13 -08:00
Ryan Mulligan
ec396f7a76 fix: if an identity is specified, don't use the default ones
fixes #151
2023-02-18 11:55:58 -08:00
Ryan Mulligan
e4f0dcc8d3 test: add tests for editing
* regular editing
* in presence of bogus id_rsa file
2023-02-18 11:54:48 -08:00
Ryan Mulligan
de657061b1
Merge pull request #150 from n8henrie/expand_tests
Expand tests
2023-02-16 17:58:21 -08:00
Nathan Henrie
0b5c4b8c8f Test rekeying via agenix CLI
This test copies the example `secrets.nix` and age files and uses the
user key to rekey them. It compares the hash before and after to ensure
that the age file is actually being changed.
2023-02-16 14:19:42 -07:00
Nathan Henrie
9e361f8b39 Install agenix CLI 2023-02-16 14:19:28 -07:00
Nathan Henrie
0efac6bcf0 Add user key, since it has access to all 3 secrets 2023-02-16 14:18:54 -07:00
Nathan Henrie
effb43cb63 Use new-style tests 2023-02-13 11:50:59 -07:00
Ryan Mulligan
ea17cc71b4
Merge pull request #139 from ryantm/rtm-1-29-cli-test
contrib: use mkDerivation for agenix cli
2023-02-11 14:18:23 -08:00
Ryan Mulligan
d0b75ddf9a contrib: use mkDerivation for agenix cli
* use mkDerivation
* separate shell code in own file
* use shellcheck to lint shell code
* remove rage version check since rage is greater than 0.5.0 on all
  maintained nixpkgs
2023-02-11 13:18:31 -08:00
Ryan Mulligan
6053c559c5
Merge pull request #146 from n8henrie/issue_143
Skip missing or unreadable keys
2023-02-11 08:54:07 -08:00
Nathan Henrie
37c7297956 Skip missing or unreadable keys 2023-02-11 07:34:06 -07:00
Nathan Henrie
578794f528 Test with nonexisting key 2023-02-11 07:31:09 -07:00
Ryan Mulligan
b7ffcfe77f
Merge pull request #141 from n8henrie/nix-darwin-support
feature: try to add nix-darwin support
2023-01-31 06:45:55 -08:00
Nathan Henrie
d7fd31756e Remove activation scripts again 2023-01-30 15:52:05 -07:00
Nathan Henrie
6ec0b0f7c7 Revert to hdiutil for older macos compatibility, be explicit about the weird number after ram:// 2023-01-30 15:51:52 -07:00
Nathan Henrie
9779a98f1e Testing for CI -- revert "Remove activation scripts"
This reverts commit 4c315d9683.
2023-01-30 15:33:50 -07:00
Nathan Henrie
4b2b6fa111 Simplify removal of trailing spaces 2023-01-30 14:37:15 -07:00
Nathan Henrie
4c315d9683 Remove activation scripts 2023-01-30 14:21:49 -07:00
Nathan Henrie
9b94b43971 format 2023-01-30 14:21:42 -07:00
Nathan Henrie
c69689da58 Use diskutil for more convenient sizes, strip trailing tabs 2023-01-30 14:21:33 -07:00
Nathan Henrie
b818ac2e7d fmt 2023-01-30 09:18:56 -07:00
Nathan Henrie
019784cb7e Give volume a name 2023-01-30 09:06:59 -07:00
Nathan Henrie
8867c12d72 Cleanup, improve readability 2023-01-30 09:06:39 -07:00
Nathan Henrie
4532604741 Silence output 2023-01-30 09:06:03 -07:00
Nathan Henrie
351e874918 Try to add nix-darwin support to agenix
Merges work by @montchr, @cmhamill, and @rtimush and rebases on main.

- fixes https://github.com/ryantm/agenix/issues/60
- fixes https://github.com/ryantm/agenix/issues/120
- closes https://github.com/ryantm/agenix/pull/107
2023-01-29 16:41:49 -07:00
Ryan Mulligan
49798e535e
Merge pull request #140 from ryantm/rtm-1-29-doc
doc: collapse installation sections
2023-01-29 14:20:34 -08:00
Ryan Mulligan
c695ebce9a doc: collapse installation sections
as suggested in #133
2023-01-29 14:13:45 -08:00
Ryan Mulligan
6d3a415637
Merge pull request #137 from ryantm/rtm-1-30-nix-format
contrib: format with Alejandra
2023-01-29 11:51:44 -08:00
Ryan Mulligan
16bef569f4 contrib: format Nix code with Alejandra 2023-01-29 10:57:51 -08:00
Ryan Mulligan
99e0963743 contrib: use Alejandra as formatter 2023-01-29 10:57:51 -08:00
Ryan Mulligan
bf537f5b72
Merge pull request #136 from ryantm/rtm-1-29-flake-format
feature: update flake output format and docs
2023-01-29 10:54:24 -08:00
Ryan Mulligan
64b0574514 feature: update flake output format and docs 2023-01-29 10:44:19 -08:00