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

add nix config snippet to restart sops-nix service #491

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

w4tsn
Copy link
Contributor

@w4tsn w4tsn commented Feb 15, 2024

As home-manager does not restart the sops-nix unit automatically a snippet to instruct home-manager to do so is added.

Home-manager could be instructed to restart the user service from the sops-nix home-manager module instead. Usually home-manager restarts units which changed. Since the sops-nix unit does not change when secrets change this does not trigger automatically.

There are two options:

As home-manager does not restart the `sops-nix` unit automatically
a snippet to instruct home-manager to do so is added.

Home-manager could be instructed to restart the user service from the
sops-nix home-manager module instead. Usually home-manager restarts
units which changed. Since the sops-nix unit does not change when
secrets change this does not trigger automatically.

There are two options:
- let sops-nix home-manager module compute a chained hash over all
  secrets and place it inside the unit file, so it changes every time
  the secrets change
- use X-SwitchMethod and X-Restart-Triggers
  See nix-community/home-manager#3865
@Mic92
Copy link
Owner

Mic92 commented Feb 20, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Feb 20, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 5611ba1

@mergify mergify bot merged commit 5611ba1 into Mic92:master Feb 20, 2024
59 checks passed
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.

None yet

2 participants