fix(nushell): guard optional agenix secrets source
This commit is contained in:
@@ -44,9 +44,13 @@ in {
|
|||||||
|
|
||||||
# Load m3tam3re secrets from agenix. The secret file is Nushell code
|
# Load m3tam3re secrets from agenix. The secret file is Nushell code
|
||||||
# containing a `load-env { ... }` block, not KEY=VALUE lines.
|
# containing a `load-env { ... }` block, not KEY=VALUE lines.
|
||||||
if ("/run/agenix/m3tam3re-secrets" | path exists) {
|
# `source` resolves literal paths at parse time, so use `null` when absent.
|
||||||
source /run/agenix/m3tam3re-secrets
|
const m3tam3re_secrets_file = if ("/run/agenix/m3tam3re-secrets" | path exists) {
|
||||||
|
"/run/agenix/m3tam3re-secrets"
|
||||||
|
} else {
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
source $m3tam3re_secrets_file
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configFile.text = ''
|
configFile.text = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user