mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/oauth2-proxy: restart service when keyFile option changes
(cherry picked from commit 0b30b27e1b
)
This commit is contained in:
parent
70d8f7aa3f
commit
71004159f4
@ -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;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user