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

Templates with file option #583

Open
RaHoni opened this issue Jun 23, 2024 · 2 comments
Open

Templates with file option #583

RaHoni opened this issue Jun 23, 2024 · 2 comments

Comments

@RaHoni
Copy link

RaHoni commented Jun 23, 2024

sops.template."dir.conf".file = ./bacula-dir.conf does not work as expected.

The reason seems to be that when I try to use ${config.sops.placeholder.bacula-dbpass} like in content it does not get replaced by the right string. Is there an easy way to fix this or is this by design?

If it is by design how are you supposed to do it?

For further reference see https://github.com/RaHoni/nixos-conf/blob/54b6cf2a49c01a256e359eaa1a0a7654375113fb/bacula/dir.nix#L23

@mihakrumpestar
Copy link

I just encountered this myself, were you able to get it working @RaHoni ?

@RaHoni
Copy link
Author

RaHoni commented Sep 25, 2024

I fixed it with a function that replaces placeholders with the correct ones.

You can see my example at my dir.nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants