Use BOT_STATE_DIR for matrix state storage
This commit is contained in:
parent
b4fd06ef51
commit
145a3e70c3
4 changed files with 12 additions and 9 deletions
|
|
@ -78,6 +78,10 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
script = ''
|
||||
export BOT_STATE_DIR="''${STATE_DIRECTORY}"
|
||||
exec ${cfg.package}/bin/matrix-ops-bot
|
||||
'';
|
||||
environment = {
|
||||
BOT_CONFIG_FILE = "%d/config.json";
|
||||
BOT_LISTEN_HOST = cfg.listenAddress;
|
||||
|
|
@ -94,7 +98,6 @@ in
|
|||
// cfg.extraEnvironment;
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${cfg.package}/bin/matrix-ops-bot";
|
||||
DynamicUser = true;
|
||||
StateDirectory = cfg.stateDirectory;
|
||||
WorkingDirectory = "/var/lib/${cfg.stateDirectory}";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ self: {
|
|||
user_id = "@ops-bot:example.invalid";
|
||||
password = "not-a-real-password";
|
||||
device_name = "nixos-test";
|
||||
store_path = "/var/lib/matrix-ops-bot/matrix";
|
||||
verify_ssl = false;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue