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

feat(modules/home-manager): add support for configuring environment variables #615

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marksisson
Copy link

Add support for configuring environment variables before calling sops-install-secrets. Introduce a new environment option which allows specifying environment variables. Modify systemd service and launchd agent to use the specified environment variables.

Environment variables to set before calling sops-install-secrets.

The values are placed in single quotes and not escaped any further to
allow usage of command substitutions for more flexibility. To properly quote
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually true? I don't think systemd will do command substitution.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't now about launchd, but it also looks to me that it should be the same.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may not be true. I copied the description for the environment option from the NixOS module at modules/sops/default.nix.

I also have only tested the launchd code path. It does work on macOS. I do not have access to a NixOS linux system. Hopefully someone can test the systemd code path.

Added support for configuring environment variables before calling
`sops-install-secrets`. Introduced a new `environment` option which
allows specifying environment variables. Modified systemd service
and launchd agent to use the specified environment variables.
@marksisson marksisson force-pushed the patches/add-environment-option-to-home-manager-module branch from 31b34ca to c8c892a Compare September 7, 2024 16:00
@Mic92
Copy link
Owner

Mic92 commented Sep 27, 2024

@SebTM could you test linux?

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

Successfully merging this pull request may close these issues.

2 participants