Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Revert some parts of the last PR trying to fix the README #26

Merged
merged 1 commit into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ in {
vaultPrefix = "kv/servers/${config.networking.hostName}";
vaultAddress = "https://vault.example.com:8200";

# Define a secret called `mysecret`, with default options.
secrets.mysecret = {};
# Define a secret called `myservice`, with default options.
secrets.myservice = {};
};

services.myservice = {
enable = true;
environmentFile = "${vs.mysecret}/environment";
environmentFile = "${vs.myservice}/environment";
};
}
```

In this example, we define a secret `mysecret` for a service called
In this example, we define a secret `myservice` for a service called
`myservice`. The AppRole used to log in will be `myservice`. In order to
log in using such an AppRole, it first needs to be created in Vault, and
credentials for it need to be generated, and placed in
Expand All @@ -49,9 +49,9 @@ script generators documented below significantly simplifies the process.
The secrets themselves will be fetched from Vault from two specific paths under
`vaultPrefix`. In this example, it will query `kv/servers/hostname/environment`
and `kv/servers/hostname/secrets`. Any keys defined in `environment` will be
dumped into `/run/secrets/mysecret/environment` in a format suitable for usage
dumped into `/run/secrets/myservice/environment` in a format suitable for usage
with systemd `EnvironmentFile`. Any keys defined in `secrets` will be dumped
into individual files under `/run/secrets/mysecret`, named after the keys, and
into individual files under `/run/secrets/myservice`, named after the keys, and
containing the corresponding value. The values of `secrets` may optionally be
flagged as `base64` encoded, which is recommended if you need to store binary
data or multiline text, as Vault has a bad habit of mangling these.
Expand Down