Refactor secrets
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -51,7 +51,7 @@ check_key() {
|
||||
set_password_file() {
|
||||
SOPS_AGE_KEY_FILE="$flake/secrets/$key/key.txt"
|
||||
export SOPS_AGE_KEY_FILE
|
||||
sops --decrypt --extract "['luks']" "$flake/hosts/$host/secrets/secrets.yaml" > /tmp/keyfile
|
||||
sops --decrypt --extract "['luks']" "$flake/secrets/hosts/$host/secrets.yaml" > /tmp/keyfile
|
||||
unset SOPS_AGE_KEY_FILE
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ prepare_disk() {
|
||||
|
||||
copy_keys() {
|
||||
mkdir -p "$root/persist/state/etc/ssh"
|
||||
cp -f "$flake/hosts/$host/secrets/ssh_host_ed25519_key" "$root/persist/state/etc/ssh/ssh_host_ed25519_key"
|
||||
cp -f "$flake/secrets/hosts/$host/ssh_host_ed25519_key" "$root/persist/state/etc/ssh/ssh_host_ed25519_key"
|
||||
|
||||
for path in "$flake/hosts/$host/users"/*; do
|
||||
if [[ -z "$key" ]]; then
|
||||
|
Reference in New Issue
Block a user