diff options
author | Sandro | 2024-06-17 14:08:31 +0200 |
---|---|---|
committer | GitHub | 2024-06-17 14:08:31 +0200 |
commit | 818bf0b7071d25bb7821395e550ee9adccab722c (patch) | |
tree | 5a7df399d5329e728c9c223243e7f40dd6698106 | |
parent | 64218fcf50fc7100c93f0708cc2097f75aa879cb (diff) | |
parent | 71004159f4ad9a64b05b2fd54bcaf18e61c8850b (diff) |
Merge pull request #320412 from NixOS/backport-320325-to-release-24.05
[Backport release-24.05] nixos/oauth2-proxy: restart service when keyFile option changes
-rw-r--r-- | nixos/modules/services/security/oauth2-proxy.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/security/oauth2-proxy.nix b/nixos/modules/services/security/oauth2-proxy.nix index 3079a1d030c5..a897f04ea633 100644 --- a/nixos/modules/services/security/oauth2-proxy.nix +++ b/nixos/modules/services/security/oauth2-proxy.nix @@ -586,11 +586,11 @@ in wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ lib.optionals needsKeycloak [ "keycloak.service" ]; after = [ "network-online.target" ] ++ lib.optionals needsKeycloak [ "keycloak.service" ]; - + restartTriggers = [ cfg.keyFile ]; serviceConfig = { User = "oauth2-proxy"; Restart = "always"; - ExecStart = "${cfg.package}/bin/oauth2-proxy ${configString}"; + ExecStart = "${lib.getExe cfg.package} ${configString}"; EnvironmentFile = lib.mkIf (cfg.keyFile != null) cfg.keyFile; }; }; |