From c77d82e784d2e4c84fcaaaf57b8f56de9a85121c Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 1 Sep 2020 14:29:37 -0700 Subject: [PATCH] move identities definition to top too --- modules/age.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/age.nix b/modules/age.nix index 32bb15e..c03c227 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -6,6 +6,7 @@ let cfg = config.age; users = config.users.users; + identities = builtins.concatStringsSep " " (map (path: "-i ${path}") cfg.sshKeyPaths); installSecret = secretType: '' TMP_DIR=$(mktemp -d) TMP_FILE="$TMP_DIR/file" @@ -13,7 +14,6 @@ let install -o '${secretType.owner}' -g '${secretType.group}' -m '${secretType.mode}' "$TMP_FILE" '${secretType.path}' rm -rf "$TMP_DIR" ''; - installAllSecrets = builtins.concatStringsSep (map installSecret (builtins.attrValues cfg.secrets)); secretType = types.submodule ({ config, ... }: { @@ -65,9 +65,6 @@ let }; }; }); - - identities = builtins.concatStringsSep " " (map (path: "-i ${path}") cfg.sshKeyPaths); - in { options.age = { secrets = mkOption {