I find these `mkProvider` and `mkRequester` functions really nice. Also fixes doc generation related to https://github.com/NixOS/nixpkgs/pull/353513
1.5 KiB
1.5 KiB
SOPS Block
Defined in /modules/blocks/sops.nix.
This block sets up a sops-nix secret.
It is only a small layer on top of sops-nix options
to adapt it to the secret contract.
Provider Contracts
This block provides the following contracts:
- secret contract under the
shb.sops.secretsoption. It is not yet tested with contract tests but it is used extensively on several machines.
As requested by the contract, when asking for a secret with the shb.sops module,
the path where the secret will be located can be found under the shb.sops.secrets.<name>.result option.
Usage
First, a file with encrypted secrets must be created by following the secrets setup section.
With Requester Module
This example shows how to use this sops block
to fulfill the request of a module using the secret contract under the option services.mymodule.mysecret.
Options Reference
id-prefix: blocks-sops-options-
list-id: selfhostblocks-block-sops-options
source: @OPTIONS_JSON@