Skip to content

Commit d8747e0

Browse files
committed
fix(nixos/rustfs): switch to file-based credentials via LoadCredential
- Rename options `accessKey`/`secretKey` to `accessKeyFile`/`secretKeyFile` to reflect usage. - Switch environment variables to `RUSTFS_ACCESS_KEY_FILE` and `RUSTFS_SECRET_KEY_FILE` to fix type mismatches (raw string vs path). - Implement systemd `LoadCredential` with `%d` expansion for secure secret injection.
1 parent e09095d commit d8747e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nixos/rustfs.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ in
175175
RUSTFS_CONSOLE_ADDRESS = cfg.consoleAddress;
176176
RUST_LOG = cfg.logLevel;
177177
# Use %d to reference the credentials directory set by LoadCredential
178-
RUSTFS_ACCESS_KEY = "file:%d/access-key";
179-
RUSTFS_SECRET_KEY = "file:%d/secret-key";
178+
RUSTFS_ACCESS_KEY_FILE = "%d/access-key";
179+
RUSTFS_SECRET_KEY_FILE = "%d/secret-key";
180180
} // lib.optionalAttrs (cfg.logDirectory != null) {
181181
RUSTFS_OBS_LOG_DIRECTORY = cfg.logDirectory;
182182
} // cfg.extraEnvironmentVariables;

0 commit comments

Comments
 (0)