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:
committed by
Jonas Nick
parent
03515a8da6
commit
b701cb5603
@@ -12,10 +12,10 @@ let testEnv = rec {
|
||||
imports = [
|
||||
./lib/test-lib.nix
|
||||
../modules/modules.nix
|
||||
../modules/secrets/generate-secrets.nix
|
||||
{
|
||||
# Features required by the Python test suite
|
||||
nix-bitcoin.secretsDir = "/secrets";
|
||||
nix-bitcoin.generateSecrets = true;
|
||||
nix-bitcoin.operator.enable = true;
|
||||
environment.systemPackages = with pkgs; [ jq ];
|
||||
}
|
||||
@@ -80,8 +80,8 @@ let testEnv = rec {
|
||||
tests.backups = cfg.backups.enable;
|
||||
|
||||
# To test that unused secrets are made inaccessible by 'setup-secrets'
|
||||
systemd.services.generate-secrets.postStart = mkIfTest "security" ''
|
||||
install -o nobody -g nogroup -m777 <(:) /secrets/dummy
|
||||
systemd.services.setup-secrets.preStart = mkIfTest "security" ''
|
||||
install -D -o nobody -g nogroup -m777 <(:) /secrets/dummy
|
||||
'';
|
||||
}
|
||||
(mkIf config.test.features.clightningPlugins {
|
||||
|
||||
Reference in New Issue
Block a user