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

How to take secrets from multiple files? #622

Open
poperigby opened this issue Sep 15, 2024 · 10 comments
Open

How to take secrets from multiple files? #622

poperigby opened this issue Sep 15, 2024 · 10 comments

Comments

@poperigby
Copy link

I currently have one big YAML file for my secrets, but it's getting a bit messy. Is there a way for me to use multiple secret files that are accessible to every host? I wanted to have a secret file for each host, and then one common.yaml file that has common secrets.

@sedlund
Copy link
Contributor

sedlund commented Sep 15, 2024

Yes. Look here:
https://github.com/Mic92/sops-nix?tab=readme-ov-file#different-file-formats

the sops.defaultSopsFile would be your common.yaml then reference the other secret files with sopsFile as shown in the example.

which secret files each machine can decrypt is configured in the .sops.yaml

@poperigby
Copy link
Author

I see. So there's no way to do it without having to specify the sopsFile for everything besides common.yaml? That would get pretty cumbersome sadly.

@sedlund
Copy link
Contributor

sedlund commented Sep 15, 2024

i have a common and one per host if needed. my home-manager with sops is separate

@poperigby
Copy link
Author

Do you manually specify the correct sopsFile every time you use it though? I have a server and the majority of secrets are for that host.

@sedlund
Copy link
Contributor

sedlund commented Sep 15, 2024

@poperigby
Copy link
Author

Thank you. I think it would be a nice feature to be able to specify multiple default sops files.

@sedlund
Copy link
Contributor

sedlund commented Sep 16, 2024

Also see #378 (comment)

@poperigby
Copy link
Author

Thank you. Should I close this issue and open a new one for being able to specify multiple default sops files?

@bjornfor
Copy link

Sounds related to #417.

@poperigby
Copy link
Author

Yeah. Seems that PR is dead though 🙁.

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

3 participants