Add restart dependencies for secrets #14

Open
opened 2026-05-30 17:13:53 +00:00 by barnett · 0 comments
Owner

Restarting/reloading systemd units on secret change
It is possible to restart or reload units when a secret changes or is newly initialized.

This behavior can be configured per-secret:

{
  sops.secrets."home-assistant-secrets.yaml" = {
    restartUnits = [ "home-assistant.service" ];
    # there is also `reloadUnits` which acts like a `reloadTrigger` in a NixOS systemd service
  };
}

From the README at https://github.com/Mic92/sops-nix

Restarting/reloading systemd units on secret change It is possible to restart or reload units when a secret changes or is newly initialized. This behavior can be configured per-secret: ``` { sops.secrets."home-assistant-secrets.yaml" = { restartUnits = [ "home-assistant.service" ]; # there is also `reloadUnits` which acts like a `reloadTrigger` in a NixOS systemd service }; } ``` From the README at https://github.com/Mic92/sops-nix
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
kebado.net/nixos-servers#14
No description provided.