Skip to content
Open
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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,19 @@ e.g. inside your `flake.nix` file:
When the `age.secrets` attribute set contains a secret, the `agenix` NixOS module will later automatically decrypt and mount that secret under the default path `/run/agenix/secret1`.
Here the `secret1.age` file becomes part of your NixOS deployment, i.e. moves into the Nix store.

You may also generate them based on the `secrets.nix` file with no extra options:
```nix
{ lib, ... }:

{
age.secrets =
lib.genAttrs (lib.map (lib.removeSuffix ".age") (lib.attrNames (import ./secrets.nix)))
(name: {
file = ./${name}.age;
});
}
```

6. Reference the secrets' mount path in your config:
```nix
{
Expand Down
Loading