mirror of https://github.com/ryantm/agenix.git
Compare commits
4 Commits
dd49fc1f2b
...
24cd57fc36
Author | SHA1 | Date |
---|---|---|
koenw | 24cd57fc36 | |
Ryan Mulligan | 24a7ea3905 | |
Ellis Gibbons | 2c1d1fb134 | |
Koen Wilde | fdaa1338f6 |
|
@ -82,7 +82,7 @@ with lib; let
|
||||||
umask u=r,g=,o=
|
umask u=r,g=,o=
|
||||||
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
|
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
|
||||||
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
|
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
|
||||||
LANG=${config.i18n.defaultLocale or "C"} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
|
LANG=${config.i18n.defaultLocale or "C"} PATH=${lib.makeBinPath cfg.pluginPackages} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
|
||||||
)
|
)
|
||||||
chmod ${secretType.mode} "$TMP_FILE"
|
chmod ${secretType.mode} "$TMP_FILE"
|
||||||
mv -f "$TMP_FILE" "$_truePath"
|
mv -f "$TMP_FILE" "$_truePath"
|
||||||
|
@ -198,6 +198,13 @@ in {
|
||||||
The age executable to use.
|
The age executable to use.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
pluginPackages = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
List of age plugins that should be available in $PATH during the build.
|
||||||
|
'';
|
||||||
|
};
|
||||||
secrets = mkOption {
|
secrets = mkOption {
|
||||||
type = types.attrsOf secretType;
|
type = types.attrsOf secretType;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
|
@ -171,7 +171,9 @@ function edit {
|
||||||
ENCRYPT=()
|
ENCRYPT=()
|
||||||
while IFS= read -r key
|
while IFS= read -r key
|
||||||
do
|
do
|
||||||
ENCRYPT+=(--recipient "$key")
|
if [ -n "$key" ]; then
|
||||||
|
ENCRYPT+=(--recipient "$key")
|
||||||
|
fi
|
||||||
done <<< "$KEYS"
|
done <<< "$KEYS"
|
||||||
|
|
||||||
REENCRYPTED_DIR=$(@mktempBin@ -d)
|
REENCRYPTED_DIR=$(@mktempBin@ -d)
|
||||||
|
|
Loading…
Reference in New Issue