mirror of
https://github.com/ryantm/agenix.git
synced 2024-09-11 06:05:38 +03:00
rename public_keys to publicKeys
more idiomatic
This commit is contained in:
parent
5e68735d26
commit
c89ed72dc6
@ -138,8 +138,8 @@ if you want to (change the system based on your system):
|
||||
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
|
||||
in
|
||||
{
|
||||
"secret1.age".public_keys = [ user1 system1 ];
|
||||
"secret2.age".public_keys = [ user1 ];
|
||||
"secret1.age".publicKeys = [ user1 system1 ];
|
||||
"secret2.age".publicKeys = [ user1 ];
|
||||
}
|
||||
```
|
||||
3. Edit secret files (assuming your SSH private key is in ~/.ssh/):
|
||||
|
@ -3,6 +3,6 @@ let
|
||||
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
|
||||
in
|
||||
{
|
||||
"secret1.age".public_keys = [ user1 system1 ];
|
||||
"secret2.age".public_keys = [ user1 ];
|
||||
"secret1.age".publicKeys = [ user1 system1 ];
|
||||
"secret2.age".publicKeys = [ user1 ];
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ trap "cleanup" 0 2 3 15
|
||||
|
||||
function edit {
|
||||
FILE=$1
|
||||
KEYS=$((nix-instantiate --eval -E "(let rules = import $RULES; in builtins.concatStringsSep \"\n\" rules.\"$FILE\".public_keys)" | sed 's/"//g' | sed 's/\\n/\n/g') || exit 1)
|
||||
KEYS=$((nix-instantiate --eval -E "(let rules = import $RULES; in builtins.concatStringsSep \"\n\" rules.\"$FILE\".publicKeys)" | sed 's/"//g' | sed 's/\\n/\n/g') || exit 1)
|
||||
|
||||
if [ -z "$KEYS" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user