move identities definition to top too
This commit is contained in:
parent
4b6b3bba3d
commit
c77d82e784
1 changed files with 1 additions and 4 deletions
|
@ -6,6 +6,7 @@ let
|
||||||
cfg = config.age;
|
cfg = config.age;
|
||||||
users = config.users.users;
|
users = config.users.users;
|
||||||
|
|
||||||
|
identities = builtins.concatStringsSep " " (map (path: "-i ${path}") cfg.sshKeyPaths);
|
||||||
installSecret = secretType: ''
|
installSecret = secretType: ''
|
||||||
TMP_DIR=$(mktemp -d)
|
TMP_DIR=$(mktemp -d)
|
||||||
TMP_FILE="$TMP_DIR/file"
|
TMP_FILE="$TMP_DIR/file"
|
||||||
|
@ -13,7 +14,6 @@ let
|
||||||
install -o '${secretType.owner}' -g '${secretType.group}' -m '${secretType.mode}' "$TMP_FILE" '${secretType.path}'
|
install -o '${secretType.owner}' -g '${secretType.group}' -m '${secretType.mode}' "$TMP_FILE" '${secretType.path}'
|
||||||
rm -rf "$TMP_DIR"
|
rm -rf "$TMP_DIR"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installAllSecrets = builtins.concatStringsSep (map installSecret (builtins.attrValues cfg.secrets));
|
installAllSecrets = builtins.concatStringsSep (map installSecret (builtins.attrValues cfg.secrets));
|
||||||
|
|
||||||
secretType = types.submodule ({ config, ... }: {
|
secretType = types.submodule ({ config, ... }: {
|
||||||
|
@ -65,9 +65,6 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
identities = builtins.concatStringsSep " " (map (path: "-i ${path}") cfg.sshKeyPaths);
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.age = {
|
options.age = {
|
||||||
secrets = mkOption {
|
secrets = mkOption {
|
||||||
|
|
Loading…
Reference in a new issue