From cdf4a224a99db1cef753b0a8d59bb274ccff5094 Mon Sep 17 00:00:00 2001 From: shokinn Date: Wed, 24 Jul 2024 19:49:50 +0200 Subject: [PATCH] change secrets.nix location from root to secrets/secrets.nix; updated agenix-helper and added an alias to accommodate that change --- dotfiles/bin/agenix-helper | 4 ++-- dotfiles/zshrc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/bin/agenix-helper b/dotfiles/bin/agenix-helper index f21bd4a..85d0928 100755 --- a/dotfiles/bin/agenix-helper +++ b/dotfiles/bin/agenix-helper @@ -105,7 +105,7 @@ gen-user-key() { local working_directory="${3:-$(pwd)}" local begin_marker='#-----BEGIN USER-SECRETS-----' local end_marker='#------END USER-SECRETS------' - local input_file="${working_directory}/secrets.nix" + local input_file="${working_directory}/secrets/secrets.nix" local userkey if [[ ${public_key} == "EMPTY" ]]; then @@ -132,7 +132,7 @@ get-host-key() { local working_directory="${4:-$(pwd)}" local begin_marker='#-----BEGIN SYSTEM-SECRETS-----' local end_marker='#------END SYSTEM-SECRETS------' - local input_file="${working_directory}/secrets.nix" + local input_file="${working_directory}/secrets/secrets.nix" local hostkey echo "getting host public key for host ${keyname}" diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 92e3645..de0e9e2 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -172,6 +172,7 @@ source ${ZSH}/oh-my-zsh.sh alias ssh-no-check="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" alias ssh-strongbox-keys="SSH_AUTH_SOCK=~/Library/Group\ Containers/group.strongbox.mac.mcguill/agent.sock ssh-add -l" +alias agenix='RULES='\''./secrets/secrets.nix'\'' agenix' alias agenix-edit="agenix -i {{@@ env['HOME'] @@}}/.ssh/agenix-phg -e" # Initialize pyenv