feat: add NATS NKey authentication support
Allow authentication to NATS using NKey seed files as an alternative to credentials files. NKeys use Ed25519 key pairs for authentication. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,12 @@ in
|
||||
default = null;
|
||||
description = "Path to NATS credentials file.";
|
||||
};
|
||||
|
||||
nkeySeedFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = "Path to NATS NKey seed file.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -133,6 +139,8 @@ in
|
||||
"--flake.nats.subject=${cfg.flake.nats.subject}"
|
||||
] ++ lib.optionals (cfg.flake.nats.enable && cfg.flake.nats.credentialsFile != null) [
|
||||
"--flake.nats.credentials-file=${cfg.flake.nats.credentialsFile}"
|
||||
] ++ lib.optionals (cfg.flake.nats.enable && cfg.flake.nats.nkeySeedFile != null) [
|
||||
"--flake.nats.nkey-seed-file=${cfg.flake.nats.nkeySeedFile}"
|
||||
]);
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
|
||||
Reference in New Issue
Block a user