diff --git a/nixos/modules/services/matrix/mautrix-telegram.nix b/nixos/modules/services/matrix/mautrix-telegram.nix index cbca6435d6c2..fc8b95051ddb 100644 --- a/nixos/modules/services/matrix/mautrix-telegram.nix +++ b/nixos/modules/services/matrix/mautrix-telegram.nix @@ -128,6 +128,18 @@ in { after = [ "network-online.target" ] ++ cfg.serviceDependencies; path = [ pkgs.lottieconverter ]; + # mautrix-telegram tries to generate a dotfile in the home directory of + # the running user if using a postgresql databse: + # + # File "python3.10/site-packages/asyncpg/connect_utils.py", line 257, in _dot_postgre> + # return (pathlib.Path.home() / '.postgresql' / filename).resolve() + # File "python3.10/pathlib.py", line 1000, in home + # return cls("~").expanduser() + # File "python3.10/pathlib.py", line 1440, in expanduser + # raise RuntimeError("Could not determine home directory.") + # RuntimeError: Could not determine home directory. + environment.HOME = dataDir; + preStart = '' # Not all secrets can be passed as environment variable (yet) # https://github.com/tulir/mautrix-telegram/issues/584