Commit Graph

12 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Sophie Tauchert
8627e0ef58
nixos/matrix/*: change dependencies on matrix-synapse.service to serviceUnit 2023-11-05 21:43:08 +01:00
rnhmjoj
4fb8212162
nixos/mautrix-whatsapp: log to the journal only
Logging outside the journal requires to manually clean/rotate the logs
and is quite surprising behavior: it should not be the default.
2023-09-04 01:20:17 +02:00
rnhmjoj
5fc70937a1
nixos/mautrix-whatsapp: set default homeserver address
Without one the bridge won't start.
Note: localhost:8448 is the default listening address of matrix-synapse.
2023-09-04 01:20:17 +02:00
rnhmjoj
035f905124
nixos/mautrix-whatsapp: fix merging of default settings
This implements proper merging of user-provided values and default
values for the settings option.

Without this, the user must provide a complete configuration file, as
changing a single setting replaces the entire JSON value, rendering the
default values completely useless. In fact, the bridge won't even start
using the default settings.
2023-09-04 01:19:54 +02:00
rnhmjoj
9e0457115e
nixos/mautrix-whatsapp: use static user and group
The DynamicUser mechanism does not allow share the bridge
registration.yaml file with matrix-synapse in any easy way:

1. the mautrix-whatsapp group under which the service runs is not in
   /etc/group, so you can't add matrix-synapse to this.
   This makes the group read bit on the file useless as the group is
   effectively always empty.

2. It's not possible to use ACLs or copy the file during preStart or
   postStart because the commands are executed with low priviledges.

By using a normal (static) user/group the secret can be shared with
synapse as follows:

  services.matrix_synapse.settings.app_service_config_files =
    [ "/var/lib/mautrix-whatsapp/whatsapp-registration.yaml" ];

  users.users.matrix-synapse.extraGroups = [ "mautrix-whatsapp" ];
2023-09-04 00:40:50 +02:00
rnhmjoj
e932745cb8
nixos/mautrix-whatsapp: fix docbook description
Until NixOS 23.11 is release all options must be marked as migrated from
docbook to markdown.
2023-09-03 22:22:27 +02:00
Frédéric Christ
3a1f5757b9 mautrix-whatsapp: move defaults back to options.
As suggested by @nickcao this commit moves the defaults back to the
options. Only `homeserver.domain` stays in the config section since the
documentation module does not support referencing attributes of other
modules.
2023-08-06 11:03:17 +02:00
Frédéric Christ
288d2ee55d mautrix-whatsapp: Move defaults to config section
This contribution applies Example 32 (conventional settings option) from
[nixpkgs](https://nixos.org/manual/nixos/stable/#sec-settings-nix-representable).
2023-08-05 13:57:15 +02:00
Frédéric Christ
0173330426 mautrix-whatsapp: Add postgres options to example 2023-08-02 21:32:55 +02:00
Frédéric Christ
b443a4d940 mautrix-whatsapp: Apply suggestions
This contribution applies suggestions made by Luflosi in
https://github.com/NixOS/nixpkgs/pull/176025#issuecomment-1237338551
as well as some general refactoring.

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-08-02 21:06:41 +02:00
Victor SENE
641d717ace nixos/mautrix-whatsapp: init module
Import from PR https://github.com/NixOS/nixpkgs/pull/176025

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-08-02 21:06:41 +02:00