option naming

This commit is contained in:
Robin Appelman 2026-05-14 19:51:08 +02:00
commit 9b4bbe925b

View file

@ -36,7 +36,7 @@ in {
default = "*:0/10";
description = "Interval to run the service";
};
keyFile = mkOption {
accessKeyFile = mkOption {
type = types.nullOr types.str;
description = "access key file path";
};
@ -59,15 +59,15 @@ in {
STATE_FILE = cfg.stateFile;
RUST_LOG = cfg.logLevel;
}
// optionalAttrs (cfg.keyFile != null) {
// optionalAttrs (cfg.accessKeyFile != null) {
ACCESS_KEY_FILE = "$CREDENTIALS_DIRECTORY/api_key";
};
serviceConfig = {
ExecStart = "${cfg.package}/bin/demostf-backup";
LoadCredential = optionals (cfg.keyFile != null) [
"api_key:${cfg.keyFile}"
LoadCredential = optionals (cfg.accessKeyFile != null) [
"api_key:${cfg.accessKeyFile}"
];
ReadWritePaths = [cfg.target cfg.stateFile];