16 lines
248 B
Bash
16 lines
248 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
cd $(git rev-parse --show-toplevel)
|
||
|
|
||
|
host=$1
|
||
|
secret=$2
|
||
|
|
||
|
mkdir -p hosts/${host}/secrets
|
||
|
|
||
|
nix run github:ryantm/agenix -- -e hosts/${host}/secrets/new
|
||
|
|
||
|
mv hosts/${host}/secrets/new hosts/${host}/secrets/${secret}.age
|
||
|
|