Fix app_service_config and RuntimeDirectory
As the nixos module now already sets a RuntimeDirectory, I had to move stuff around and use some `lib.mkForce`.
This commit is contained in:
parent
c4e80d0d91
commit
5003a40a97
1 changed files with 7 additions and 3 deletions
|
|
@ -90,14 +90,18 @@ lib.mkIf cfg.enable {
|
|||
)
|
||||
cfg.synapse.app_service_config;
|
||||
serviceConfig = {
|
||||
RuntimeDirectory = "matrix-synapse/app_service_config";
|
||||
RuntimeDirectory = lib.mkForce [
|
||||
"matrix-synapse"
|
||||
"matrix-synapse/app_service_config"
|
||||
];
|
||||
RuntimeDirectoryPreserve = lib.mkForce false;
|
||||
ExecStartPre = lib.attrsets.mapAttrsToList
|
||||
(name: value:
|
||||
let
|
||||
script = pkgs.writeShellScript "app_service_config-${name}"
|
||||
''
|
||||
cp "${value}" "$RUNTIME_DIRECTORY/${name}.yaml"
|
||||
chown matrix-synapse: "$RUNTIME_DIRECTORY/${name}.yaml"
|
||||
cp "${value}" "/run/matrix-synapse/app_service_config/${name}.yaml"
|
||||
chown matrix-synapse: "/run/matrix-synapse/app_service_config/${name}.yaml"
|
||||
'';
|
||||
in
|
||||
"+${script}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue