mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
terraform/all-in-one: fix zfs decrypt example
This commit is contained in:
parent
8b907bb53c
commit
1fdbe4cdcd
@ -48,7 +48,7 @@ mkdir -p etc/ssh var/lib/secrets
|
|||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
umask 0177
|
umask 0177
|
||||||
sops --extract '["initrd_ssh_key"]' -d "$SCRIPT_DIR/secrets.yaml" >./var/lib/secrets/initrd_ssh_key
|
sops --extract '["initrd_ssh_key"]' --decrypt "$SCRIPT_DIR/secrets.yaml" >./var/lib/secrets/initrd_ssh_key
|
||||||
|
|
||||||
# restore umask
|
# restore umask
|
||||||
umask 0022
|
umask 0022
|
||||||
@ -59,7 +59,7 @@ for keyname in ssh_host_rsa_key ssh_host_rsa_key.pub ssh_host_ed25519_key ssh_ho
|
|||||||
else
|
else
|
||||||
umask 0177
|
umask 0177
|
||||||
fi
|
fi
|
||||||
sops --extract '["'$keyname'"]' -d "$SCRIPT_DIR/secrets.yaml" >"./etc/ssh/$keyname"
|
sops --extract '["'$keyname'"]' --decrypt "$SCRIPT_DIR/secrets.yaml" >"./etc/ssh/$keyname"
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
sops --extract '["zfs-key"]' -d "$SCRIPT_DIR/secrets.yaml" >"./etc/ssh/$keyname"
|
sops --extract '["zfs-key"]' --decrypt "$SCRIPT_DIR/secrets.yaml"
|
||||||
```
|
```
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
Loading…
Reference in New Issue
Block a user