From c89ed72dc6b58b6cced2acc4f8b1198696d121c9 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Thu, 3 Sep 2020 21:13:10 -0700 Subject: [PATCH] rename public_keys to publicKeys more idiomatic --- README.md | 4 ++-- example/secrets.nix | 4 ++-- pkgs/agenix.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index db12114..7943df7 100644 --- a/README.md +++ b/README.md @@ -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/): diff --git a/example/secrets.nix b/example/secrets.nix index 79786b6..8896b56 100644 --- a/example/secrets.nix +++ b/example/secrets.nix @@ -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 ]; } diff --git a/pkgs/agenix.nix b/pkgs/agenix.nix index 38262e7..07520f9 100644 --- a/pkgs/agenix.nix +++ b/pkgs/agenix.nix @@ -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