about summary refs log tree commit diff
path: root/nixos/modules/services/security/oauth2-proxy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/security/oauth2-proxy.nix')
-rw-r--r--nixos/modules/services/security/oauth2-proxy.nix4
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 3079a1d030c52..a897f04ea6333 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;
         };
       };