From 740fea3eddfd1b6a8a1f65f32ae3bd0336370f14 Mon Sep 17 00:00:00 2001 From: John Soo Date: Thu, 16 Mar 2023 09:45:09 -0700 Subject: [PATCH] fixup! nixos/minio: activate/restart service on credentials path changes --- nixos/modules/services/web-servers/minio.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/web-servers/minio.nix b/nixos/modules/services/web-servers/minio.nix index a1695e6a1edf..21bec4f63a87 100644 --- a/nixos/modules/services/web-servers/minio.nix +++ b/nixos/modules/services/web-servers/minio.nix @@ -124,8 +124,11 @@ in } (lib.mkIf (cfg.rootCredentialsFile != null) { + # The service will fail if the credentials file is missing services.minio.unitConfig.ConditionPathExists = cfg.rootCredentialsFile; + # The service will not restart if the credentials file has + # been changed. This can cause stale root credentials. paths.minio-root-credentials = { wantedBy = [ "multi-user.target" ];