Skip to content

Commit ec05efc

Browse files
committed
fix(deploy): decrypt public ssh key so we can use sops to create the ssh keyfiles
1 parent 6e5c3c8 commit ec05efc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nixos

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ task_generate_hm_sops_configuration() {
7878

7979
find "${dir}/hosts/${HOST}/users" -mindepth 1 -maxdepth 1 -type d ! -name ".*" -printf '%f\n' >tmp
8080
while IFS= read -r user; do
81-
sops_create_or_update_public_age_key "user_${user}" "$(ssh-to-age <"${dir}/hosts/${HOST}/users/${user}/secrets/id_ed25519.pub")" "$file"
81+
sops_create_or_update_public_age_key "user_${user}" "$(sops -d "hosts/${HOST}/users/${user}/secrets/id_ed25519.pub" | ssh-to-age)" "$file"
8282

8383
sops_create_or_update_creation_rules "hosts/shared/secrets/.*" "user_${user}" "$file"
8484
sops_create_or_update_creation_rules "hosts/${HOST}/users/${user}/secrets/.*" "user_${user}" "$file"
@@ -105,8 +105,8 @@ case "${1-help}" in
105105
"deploy")
106106
menu_deploy
107107
ssh_generate_host_ssh_key
108-
cmd_git task_generate_host_sops_configuration
109-
cmd_git task_generate_hm_sops_configuration
108+
task_generate_host_sops_configuration
109+
task_generate_hm_sops_configuration
110110
task_nixos_install
111111
exit 0
112112
;;

0 commit comments

Comments
 (0)