fix(nushell): source agenix secret env
This commit is contained in:
@@ -42,15 +42,10 @@ in {
|
||||
| load-env
|
||||
}
|
||||
|
||||
# Load m3tam3re secrets from agenix
|
||||
# Load m3tam3re secrets from agenix. The secret file is Nushell code
|
||||
# containing a `load-env { ... }` block, not KEY=VALUE lines.
|
||||
if ("/run/agenix/m3tam3re-secrets" | path exists) {
|
||||
open /run/agenix/m3tam3re-secrets
|
||||
| lines
|
||||
| where {($in | str trim | str length) > 0}
|
||||
| parse "{key}={value}"
|
||||
| update value {str trim -c '"'}
|
||||
| transpose -r -d
|
||||
| load-env
|
||||
source /run/agenix/m3tam3re-secrets
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user