openbao-agent invalid config with no templates defined #254

Open
opened 2025-08-07 09:13:34 +00:00 by delroth · 1 comment
Owner

Using the openbao-agent module without defining any templates seems to lead to a config that the agent cannot parse (failing to initialize):

Jul 28 17:16:31 bagel-box bao[218169]: error loading configuration from /nix/store/a6fk0dfr99wp3cdv0iyvkmyshr4rnbif-agent.json: error parsing 'template': error converting config
Using the openbao-agent module without defining any templates seems to lead to a config that the agent cannot parse (failing to initialize): ``` Jul 28 17:16:31 bagel-box bao[218169]: error loading configuration from /nix/store/a6fk0dfr99wp3cdv0iyvkmyshr4rnbif-agent.json: error parsing 'template': error converting config ```
Owner

Consider using services.vault-agent from nixpkgs instead of services.openbao-agent from https://git.lix.systems/the-distro/systemd-openbao.

The module in https://git.lix.systems/the-distro/systemd-openbao (or rather https://github.com/numtide/systemd-vaultd) exists, because at the time there simply was no module for that in nixpkgs yet.

See

The timing on this is just funny, because you happen to encounter this a few weeks after https://github.com/NixOS/nixpkgs/issues/420208 and a few days after https://github.com/NixOS/nixpkgs/pull/431031 was opened, but not merged yet.

I am also in the process of renaming services.vault-agent to services.openbao-agent for various reasons in nixpkgs, but we will see how that goes. For now, the main difference is that you need to set services.vault-agent.instances.<name>.package = pkgs.openbao.

And you will have to bump your nixpkgs input for this once.

Consider using `services.vault-agent` from nixpkgs instead of `services.openbao-agent` from <https://git.lix.systems/the-distro/systemd-openbao>. The module in https://git.lix.systems/the-distro/systemd-openbao (or rather <https://github.com/numtide/systemd-vaultd>) exists, because at the time there simply was no module for that in nixpkgs yet. See - https://github.com/NixOS/nixpkgs/issues/420208 - https://github.com/NixOS/nixpkgs/pull/431031 and - https://github.com/NixOS/nixpkgs/pull/283534#issuecomment-3152494935 The timing on this is just funny, because you happen to encounter this a few weeks after <https://github.com/NixOS/nixpkgs/issues/420208> and a few days after <https://github.com/NixOS/nixpkgs/pull/431031> was opened, but not merged yet. I am also in the process of renaming `services.vault-agent` to `services.openbao-agent` for various reasons in nixpkgs, but we will see how that goes. For now, the main difference is that you need to set `services.vault-agent.instances.<name>.package = pkgs.openbao`. And you will have to bump your nixpkgs input for this once.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#254
No description provided.