dendrite: Use LoadCredential to load private key

This commit is contained in:
Erwin Boskma 2024-04-24 14:59:02 +02:00
parent c80dd6998b
commit e532ad8538
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 5 additions and 3 deletions

View file

@ -73,8 +73,8 @@ inputs: {
neo = {
config = import ./neo/configuration.nix inputs;
deploy = {
host = "10.0.0.157";
# host = "neo.barn-beaver.ts.net";
# host = "10.0.0.213";
host = "neo.barn-beaver.ts.net";
targetUser = "erwin";
tags = [ "container" ];
};

View file

@ -17,7 +17,8 @@ let
settings = {
global = {
server_name = "matrix.boskma.frl";
private_key = config.sops.secrets.dendrite-private-key.path;
# private_key = config.sops.secrets.dendrite-private-key.path;
private_key = "$$CREDENTIALS_DIRECTORY/private_key";
database = {
connection_string = "postgresql://%2Frun%2Fpostgresql/dendrite";
@ -114,6 +115,7 @@ in
RuntimeDirectoryMode = "0700";
LimitNOFILE = 65535;
EnvironmentFile = environmentFile;
LoadCredential = [ "private_key:${config.sops.secrets.dendrite-private-key.path}" ];
ExecStartPre = [
''
${pkgs.envsubst}/bin/envsubst \