rename public_keys to publicKeys

more idiomatic
This commit is contained in:
Ryan Mulligan 2020-09-03 21:13:10 -07:00
parent 5e68735d26
commit c89ed72dc6
3 changed files with 5 additions and 5 deletions

View file

@ -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/):

View file

@ -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 ];
}

View file

@ -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