secrets: add option 'generateSecrets'

Move this feature from a module preset to a regular option, so that it's
easily discoverable and accessible.

Simplify the implementation of `generateSecrets` by adding it to the
existing `setup-secrets` service script.

Also rename option setup-secrets -> setupSecrets.
This commit is contained in:
Erik Arvstedt
2021-03-10 14:08:34 +01:00
committed by Jonas Nick
parent 03515a8da6
commit b701cb5603
7 changed files with 51 additions and 44 deletions

View File

@@ -83,8 +83,8 @@ read -d '' src <<EOF || true
config = { pkgs, config, lib, ... }: {
imports = [
<${configuration}>
<nix-bitcoin/modules/secrets/generate-secrets.nix>
];
nix-bitcoin.generateSecrets = true;
};
};
}