Add OCI credentials and deploy script for NixOracle
- Encrypt OCI API key and config with age (secrets/oci_key.age, oci_config.age) - Auto-restore ~/.oci/ via home.activation on nixos-rebuild - Add deploy-oracle.sh: creates boot volume snapshot (max 4) before deploying Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b75a3f4b29
commit
d7436b2095
6 changed files with 105 additions and 0 deletions
|
|
@ -375,6 +375,18 @@ in
|
|||
".config/wofi/menu.css".source = ../configs/wofi/menu.css;
|
||||
};
|
||||
|
||||
home.activation.ociCredentials = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
key_file="/run/agenix/oci_key"
|
||||
config_file="/run/agenix/oci_config"
|
||||
if [ -r "$key_file" ] && [ -r "$config_file" ]; then
|
||||
mkdir -p "$HOME/.oci"
|
||||
chmod 700 "$HOME/.oci"
|
||||
ln -sf "$key_file" "$HOME/.oci/key.pem"
|
||||
ln -sf "$config_file" "$HOME/.oci/config"
|
||||
fi
|
||||
'';
|
||||
|
||||
home.activation.openclawGatewayEnv = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
token_file="/run/agenix/openclaw_gateway_token"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue