Skip to content

Commit

Permalink
nixos/oauth2-proxy: restart service when keyFile option changes (#320325
Browse files Browse the repository at this point in the history
)
  • Loading branch information
SuperSandro2000 committed Jun 17, 2024
1 parent 311a251 commit ca4f0be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/security/oauth2-proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down

0 comments on commit ca4f0be

Please sign in to comment.